/* ============================================
   Site-wide overrides + improvements
   ============================================ */

/* Canonical font stacks — single source of truth */
:root {
  --font-serif: 'Sorts Mill Goudy', Georgia, 'Times New Roman', serif;
  --font-sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Default everything to serif — matches live site (Sorts Mill Goudy everywhere) */
html, body, body.home, body.page, body[class] {
  font-family: var(--font-serif) !important;
}
body *:not(.fa):not(.fas):not(.fab):not(.far):not(.fal):not(.fad):not([class*="eicon"]):not([class*="genericon"]):not([class*="dashicons"]) {
  font-family: var(--font-serif) !important;
}

/* Font Awesome icons preserved */
.fa, .fas, .far, .fab, .fal, .fad,
[class^="elementor-icon"], [class*=" elementor-icon"],
[class^="eicon"], [class*=" eicon"],
[class*="genericon"] {
  font-family: inherit;
}
.fa, .fas { font-family: 'Font Awesome 5 Free' !important; }
.fab { font-family: 'Font Awesome 5 Brands' !important; }
.far, .fal { font-family: 'Font Awesome 5 Free' !important; }

/* 0. Hide legacy WP/Gridbox theme header — use only our custom menu */
#masthead.site-header,
#site-navigation.main-navigation,
.site-header.clearfix {
  display: none !important;
}

/* Hide the entire legacy Elementor header section (3c5f2e3) — our custom site-menu replaces it.
   Contains: duplicate "Mahan Mehrvarz" heading + redundant hamburger icon + hidden nav-menu widget */
section[data-id="3c5f2e3"] {
  display: none !important;
}

/* Fallback: hide duplicate "Mahan Mehrvarz" heading if section ever becomes visible */
.elementor-element-362a6e4 {
  display: none !important;
}

/* Pad page top so content clears the fixed custom menu */
body {
  padding-top: 60px !important;
}
@media (max-width: 600px) {
  body { padding-top: 52px !important; }
}

/* 1. Force-show Elementor sections stuck in invisible state
   (happens when frontend JS init fails) */
.elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
}

/* 2. NEWS sticker: pull up to clear logos and slightly tilt */
.elementor-element-44e15eb {
  margin-top: -180px !important;
  position: relative;
  z-index: 5;
  pointer-events: none;
}
.elementor-element-44e15eb img {
  max-width: 220px !important;
  height: auto !important;
  transform: rotate(-6deg);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.18));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.elementor-element-44e15eb:hover img {
  transform: rotate(-3deg) scale(1.05);
}
@media (max-width: 768px) {
  .elementor-element-44e15eb { margin-top: -120px !important; }
  .elementor-element-44e15eb img { max-width: 150px !important; }
}

/* 3. Typography consistency
   Headings: Sorts Mill Goudy (serif), single-weight family
   Body + UI: Roboto (sans) */
h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.entry-title,
.site-title {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* Unified card title style — wins over Elementor per-element scoped CSS.
   Stack body + elementor-2563 prefixes to beat .elementor-2563 .elementor-element-xxx specificity. */
body .elementor .widget-image-caption,
body .elementor figcaption.wp-caption-text,
body .elementor-2563 .widget-image-caption,
body .elementor-2563 .elementor-element .widget-image-caption,
body .elementor-2563 figcaption.wp-caption-text,
body figure .widget-image-caption,
.widget-image-caption,
.wp-caption-text {
  font-family: var(--font-serif) !important;
  font-weight: 500 !important;
  font-size: 1.15rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #111 !important;
  line-height: 1.3 !important;
  margin-top: 0.6rem !important;
}

/* Project tag hashtag rows — applies to all project section rows */
body .elementor-widget-heading .elementor-heading-title.elementor-size-default {
  font-family: var(--font-serif) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  margin-top: 0.25rem;
  display: block !important;
}
/* Tag rows in project section: small, gray, centered */
body section[data-id="b1d580c"] .elementor-widget-heading .elementor-heading-title,
body section[data-id="a3d9434"] .elementor-widget-heading .elementor-heading-title,
body .elementor-section[data-id="b1d580c"] + .elementor-section .elementor-widget-heading .elementor-heading-title {
  font-size: 0.92rem !important;
  color: #777 !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

/* Refined body line-height + measure */
.elementor-widget-text-editor p,
.elementor-widget-text-editor li {
  line-height: 1.65;
}

/* Dark "About" section: keep text white */
#about,
#about p,
#about li,
#about span,
#about .elementor-widget-text-editor p,
#about .elementor-widget-text-editor span,
#about .elementor-widget-blockquote,
#about .elementor-widget-blockquote * {
  color: #f5f5f5 !important;
}
#about a {
  color: #f5f5f5 !important;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s;
}
#about a:hover { text-decoration-color: #fff; }
/* Quote block inside about — explicitly force visible */
#about .elementor-blockquote,
#about blockquote,
#about figure.elementor-blockquote,
#about .elementor-widget-blockquote .elementor-blockquote,
#about .elementor-widget-blockquote {
  background: rgba(255,255,255,0.06) !important;
  padding: 1.75rem !important;
  border-left: 3px solid rgba(255,255,255,0.4) !important;
  border-radius: 4px;
}
#about blockquote,
#about blockquote *,
#about .elementor-blockquote,
#about .elementor-blockquote *,
#about .elementor-widget-blockquote * {
  color: #f5f5f5 !important;
  border-color: rgba(255,255,255,0.3) !important;
}
#about .elementor-blockquote__author,
#about .elementor-blockquote cite {
  color: rgba(245,245,245,0.7) !important;
  font-style: italic;
}

/* 4. Project grid: gentler hover, sharper images, refined gutter */
.elementor-section[data-id="b1d580c"] .elementor-column {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.elementor-section[data-id="b1d580c"] img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s;
  image-rendering: -webkit-optimize-contrast;
}
.elementor-section[data-id="b1d580c"] a:hover img {
  transform: scale(1.04);
  filter: brightness(0.95);
}
.elementor-section[data-id="b1d580c"] .widget-image-caption {
  margin-top: 0.6rem;
  font-family: var(--font-serif) !important;
  font-weight: 500 !important;
  font-size: 1.15rem !important;
  color: #111 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
}

/* 5. Scroll-suspense — JS adds [data-reveal] to off-screen sections.
   CSS animation auto-reveals after 2.5s as safety. */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
  animation: reveal-safety 0s ease 2.5s forwards;
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}
@keyframes reveal-safety {
  to { opacity: 1; transform: translateY(0); }
}

/* Subtle parallax on hero image */
.elementor-element-c4d15ef img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth focus rings */
a:focus-visible, button:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Selection color */
::selection {
  background: #111;
  color: #fff;
}

/* Smoother site-wide font rendering */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

/* Rogue <br> tags ejected from malformed <head> into <body> by browser HTML parser */
body > br {
  display: none !important;
}

/* ============================================
   MOBILE responsive polish
   ============================================ */
@media (max-width: 768px) {
  /* Tighten Elementor section padding */
  .elementor-section.elementor-section-boxed > .elementor-container,
  .elementor-top-section > .elementor-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .elementor-section {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

  /* Hero section: zero out the section-level padding so video sits flush under the menu */
  section[data-id="80a94a5"] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Video widget: kill Elementor's default 20px margin-bottom between video and logos */
  .elementor-element-1873e6b {
    margin-bottom: 0 !important;
  }

  /* Salam inner section (d953bed): zero section padding on mobile — the salam box has its own */
  body .elementor-element-d953bed {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Larger touch targets in menu */
  .site-menu nav a,
  .site-menu nav button {
    padding: 0.5rem 0.5rem !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center;
    font-size: 0.85rem !important;
  }
  .site-menu { padding: 0.5rem 1rem !important; }
  .site-menu .brand { font-size: 1rem !important; }
  .site-menu nav { gap: 0.5rem !important; }

  /* ── HERO SECTION (80a94a5): stack vertically on mobile ── */
  /* Cancel the desktop negative-margin overlap; stack col-66 + col-33 naturally */
  section[data-id="80a94a5"] > .elementor-container {
    flex-direction: column !important;
    align-items: stretch !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* Hero video column: natural width, no desktop negative margin trick */
  body .elementor-element-0d3bbc4 {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    z-index: 1 !important;
  }

  /* Hero video: full-bleed, capped at 56vw height (16:9-ish), no overflow */
  .elementor-element-1873e6b video,
  .elementor-element-1873e6b img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 56vw !important;
    object-fit: cover !important;
    display: block !important;
    transform: scaleX(-1) !important; /* preserve the horizontal flip */
  }

  /* Salam column: full width below hero video */
  body .elementor-element-9b70bf2 {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    z-index: 2 !important;
    align-self: stretch !important;
  }
  body .elementor-element-9b70bf2 > .elementor-widget-wrap {
    padding: 0 !important;
  }

  /* Salam box: full-width card below video, no floating */
  body .elementor-element-918ca69 {
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
    border-radius: 0 !important;
    padding: 1.5rem 1.25rem 1.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    transform: none !important; /* disable JS parallax float on mobile */
    transition: none !important;
  }

  /* Salam box typography: tighter on mobile */
  .elementor-element-918ca69 h3 {
    font-size: 1.75rem !important;
    margin-bottom: 0.5rem !important;
  }
  .elementor-element-918ca69 h4,
  .elementor-element-918ca69 h5 {
    font-size: 1.05rem !important;
    margin-bottom: 0.6rem !important;
  }
  .elementor-element-918ca69 p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin: 0.65rem 0 !important;
  }

  /* Logos section: center, stack gracefully */
  section[data-id="49995f2"] .elementor-container {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2rem !important;
    padding: 1.25rem 1rem !important;
  }
  body section[data-id="49995f2"] .elementor-column {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }
  /* Force widget and widget-container inside logo columns to shrink to content */
  body section[data-id="49995f2"] .elementor-widget-wrap,
  body section[data-id="49995f2"] .elementor-widget,
  body section[data-id="49995f2"] .elementor-widget-container {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  section[data-id="49995f2"] img {
    max-width: 100px !important;
    height: auto !important;
  }

  /* NEWS sticker: hidden (already display:none from rule above) */

  /* Project + article grids — single column with smaller gap */
  section[data-id="b1d580c"] .elementor-container,
  section[data-id="a3d9434"] .elementor-container,
  section[data-id="ee2f878"] .elementor-container {
    flex-direction: column !important;
    gap: 0 !important;
  }
  section[data-id="b1d580c"] .elementor-column,
  section[data-id="a3d9434"] .elementor-column {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.5rem !important;
  }

  /* Project thumbs: full width, consistent caption */
  .elementor-widget-image figure { margin: 0 !important; }
  .widget-image-caption,
  .wp-caption-text {
    font-size: 1rem !important;
    margin-top: 0.5rem !important;
    line-height: 1.35 !important;
  }

  /* Project circles: both rows equal size at 200px */
  section[data-id="b1d580c"] img,
  section[data-id="a3d9434"] img {
    max-width: 200px !important;
    width: 200px !important;
    height: 200px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* About section — better readability */
  #about { padding: 2rem 0 !important; }
  #about .elementor-container {
    flex-direction: column !important;
  }
  #about .elementor-column {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #about .elementor-widget-text-editor p,
  #about p, #about span { font-size: 1rem !important; line-height: 1.6 !important; }
  #about blockquote { padding: 1rem !important; margin: 1rem 0 !important; font-size: 0.95rem !important; }

  /* Salam heading tighter */
  .elementor-element-362a6e4 { display: none !important; }
  h3, .elementor-heading-title { font-size: 1.35rem !important; }
  h5, h4 { font-size: 1.05rem !important; }

  /* Section titles (e.g. "My Six Projects") */
  .elementor-widget-heading .elementor-heading-title.elementor-size-xl,
  .elementor-widget-heading .elementor-heading-title.elementor-size-xxl {
    font-size: 1.6rem !important;
  }

  /* Hide menu auto-hide on mobile (helps re-discoverability) */
  .site-menu.hidden { transform: translateY(0) !important; }

  /* Scroll-top button — more reachable */
  .scroll-top { bottom: 1rem !important; right: 1rem !important; width: 44px !important; height: 44px !important; }

  /* Footer: stack vertically, center social icons */
  .elementor-section[data-id="footer"],
  footer,
  .site-footer { padding: 0 !important; }

  /* Custom site footer bar (bottom black strip) */
  .elementor-location-footer .elementor-top-section > .elementor-container,
  .site-footer-inner,
  body > footer .elementor-container {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1rem !important;
    padding: 1.25rem 1rem !important;
  }

  /* Social icons in footer — touch-friendly spacing */
  .elementor-social-icons-wrapper,
  .elementor-widget-social-icons .elementor-social-icons {
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  .elementor-social-icon {
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Writing section "As a Writer..." heading */
  section[data-id="ee2f878"] {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Very small phones (≤430px CSS px = iPhone 14 Pro Max and smaller) */
@media (max-width: 430px) {
  .site-menu .brand { font-size: 0.9rem !important; }
  .site-menu nav { gap: 0.35rem !important; }
  .site-menu nav a, .site-menu nav button {
    font-size: 0.78rem !important;
    padding: 0.5rem 0.35rem !important;
  }

  /* Hero: full-width video, tighter Salam box */
  .elementor-element-918ca69 {
    padding: 1.25rem 1rem 1.5rem !important;
  }
  .elementor-element-918ca69 h3 { font-size: 1.5rem !important; }
  .elementor-element-918ca69 h4,
  .elementor-element-918ca69 h5 { font-size: 1rem !important; }
  .elementor-element-918ca69 p { font-size: 0.95rem !important; }

  /* Project circles: slightly smaller on very small screens — both rows equal */
  section[data-id="b1d580c"] img,
  section[data-id="a3d9434"] img {
    max-width: 170px !important;
    width: 170px !important;
    height: 170px !important;
  }
}

/* Quote box (white-bg) inside About — force readable black text */
#about .elementor-element-68e7d88,
#about .elementor-element-68e7d88 *,
#about .elementor-element-68e7d88 p,
#about .elementor-element-68e7d88 p em,
#about .elementor-element-68e7d88 p span,
#about .elementor-element-68e7d88 p strong,
#about .elementor-element-68e7d88 .elementor-widget-container p,
#about .elementor-element-68e7d88 .elementor-widget-container * {
  color: #111 !important;
}

/* User request: remove NEWS sticker */
.elementor-element-44e15eb { display: none !important; }

/* User request: flip hero GIF/video horizontally */
.elementor-element-1873e6b img,
.elementor-element-1873e6b video {
  transform: scaleX(-1);
}

/* Salam: translucent backdrop, box sized to text only (no extra white) */
@media (min-width: 769px) {
  /* ── Section 80a94a5 = hero+Salam row ── */
  section[data-id="80a94a5"] > .elementor-container {
    max-width: 100% !important;
    padding-right: 0 !important;
    align-items: stretch !important;
  }

  /* ── Hero image column: takes all space, extends right under Salam box ── */
  body .elementor-element-0d3bbc4 {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    margin-right: -380px !important;
    position: relative !important;
    z-index: 1 !important;
  }
  body .elementor-element-1873e6b img,
  body .elementor-element-1873e6b video {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
  }
  /* Salam col on top of overlap zone */
  body .elementor-element-9b70bf2 {
    position: relative !important;
    z-index: 2 !important;
  }

  /* ── Salam right column: sized to fit the box tightly ── */
  body .elementor-element-9b70bf2 {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    padding: 2rem 2rem 2rem 0 !important;
    align-self: center !important;
  }
  /* Zero out Elementor's default column padding on widget-wrap */
  body .elementor-element-9b70bf2 > .elementor-widget-wrap {
    padding: 0 !important;
  }

  /* ── Inner section d953bed: no extra sizing ── */
  body .elementor-element-d953bed,
  body .elementor-element-d953bed > .elementor-container {
    width: auto !important;
    max-width: none !important;
  }

  /* ── FIX: cancel Elementor's -67% negative margin on widget-wrap inside 918ca69 ──
     post-2563.css sets margin: 0% 0% 0% -67% on .elementor-element-918ca69 > .elementor-element-populated
     which shifts the widget-wrap 257px left, outside the white box.
     We must override it to 0. */
  .elementor-element-918ca69 > .elementor-element-populated,
  body .elementor-element-918ca69 > .elementor-widget-wrap {
    margin: 0 !important;
    --e-column-margin-left: 0px !important;
    --e-column-margin-right: 0px !important;
  }

  /* ── Salam box: the white translucent card ── */
  body .elementor-element-918ca69 {
    background: rgba(255,255,255,0.82) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.8rem 1.8rem !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.1);
    border-radius: 2px;
    position: relative;
    z-index: 3;
    width: auto !important;
    max-width: 648px !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    transition: box-shadow 0.3s;
    /* Hero image extends underneath via margin-right; box stays in column */
    transform: translateY(var(--salam-y, 0px));
  }
  body .elementor-element-918ca69:hover {
    box-shadow: 0 14px 36px rgba(0,0,0,0.14);
  }

  /* ── Kill any background on inner elements ── */
  .elementor-element-918ca69 .elementor-widget-wrap,
  .elementor-element-918ca69 .elementor-widget-container,
  .elementor-element-918ca69 .elementor-widget {
    background: transparent !important;
    background-color: transparent !important;
  }

  /* ── Inner widget f171120: fill box width, no extra sizing ── */
  body .elementor-element-918ca69 .elementor-element-f171120,
  body .elementor-element-918ca69 .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ── Text elements fill box width ── */
  body .elementor-element-918ca69 p,
  body .elementor-element-918ca69 h3,
  body .elementor-element-918ca69 h4,
  body .elementor-element-918ca69 h5 {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ── Typography (20% bigger) ── */
  .elementor-element-918ca69 h3 {
    font-size: 2.1rem !important;
    margin-bottom: 0.65rem !important;
  }
  .elementor-element-918ca69 h4,
  .elementor-element-918ca69 h5 {
    font-size: 1.38rem !important;
    margin-bottom: 0.85rem !important;
  }
  .elementor-element-918ca69 p {
    font-size: 1.2rem !important;
    line-height: 1.55 !important;
    margin: 0.85rem 0 !important;
  }
}

/* ── Logos: spacing + float on scroll ── */
@media (min-width: 769px) {
  /* Distance between the two logos */
  body section[data-id="49995f2"] .elementor-column.elementor-element-910ab07 {
    margin-right: 2rem !important;
  }
  body section[data-id="49995f2"] .elementor-column.elementor-element-dda0756 {
    margin-left: 2rem !important;
  }
  /* Float on scroll — uses CSS var --logo-y from JS */
  .elementor-element-9228446 img,
  .elementor-element-979dfaa img {
    transition: transform 0.2s ease-out;
    transform: translateY(var(--logo-y, 0px));
    will-change: transform;
  }
  .elementor-element-9228446 img { --logo-shift: 1; }
  .elementor-element-979dfaa img { --logo-shift: -1; }
}

/* ============================================
   Writing section (ee2f878): 3-per-row grid + card consistency
   ============================================ */

/* Force wrap so a 4th card starts a new row instead of squishing all 4 */
section[data-id="ee2f878"] > .elementor-container {
  flex-wrap: wrap !important;
}

/* Each col-33 in this section: true 1/3 width so exactly 3 fit per row */
section[data-id="ee2f878"] .elementor-column {
  flex: 0 0 33.333% !important;
  width: 33.333% !important;
  max-width: 33.333% !important;
  box-sizing: border-box !important;
}

/* Consistent image aspect ratio across all writing cards (16:9 ≈ existing cards) */
section[data-id="ee2f878"] .elementor-widget-image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  display: block !important;
}

/* Subtle border on new cards' images so white-bg image is visually distinct */
.elementor-element-newpaper1img img,
.elementor-element-newpaper2img img {
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 1px;
}

/* New cards figcaption: force left-align to match all other cards. */
.elementor-element-newpaper1 .widget-image-caption,
.elementor-element-newpaper1 figcaption.wp-caption-text,
.elementor-element-newpaper2 .widget-image-caption,
.elementor-element-newpaper2 figcaption.wp-caption-text {
  text-align: left !important;
}

/* New cards subtitle: match the gray color of all other card subtitles. */
.elementor-element-newpaper1cap .elementor-heading-title,
.elementor-element-newpaper2cap .elementor-heading-title {
  color: #6e6e6e !important;
}

/* Mobile: writing section single-column stacking */
@media (max-width: 768px) {
  section[data-id="ee2f878"] .elementor-column {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ============================================
   VIDEO WIDGET: static iframe sizing fix
   Elementor normally injects iframes via JS (chunk 180 = video bundle).
   We embed iframes directly in HTML, but .elementor-video has no height set,
   so "height:100%" on the iframe resolves to browser default 150px.
   Fix: make .elementor-video fill the aspect-ratio-driven .elementor-wrapper.
   ============================================ */
.elementor-widget-video .elementor-wrapper .elementor-video {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================
   EMOJI in figcaptions/text — keep inline-sized
   (some script replaces unicode emoji with full-size img) */
/* High-specificity selectors so emoji rule beats Elementor's section img:100% */
section .elementor-widget-image img.emoji,
section .elementor-widget-image figcaption img.emoji,
.elementor-widget-image figcaption img.emoji,
figcaption.wp-caption-text img.emoji,
.widget-image-caption img.emoji,
body img.emoji,
body img.wp-smiley {
  height: 1em !important;
  width: 1em !important;
  display: inline-block !important;
  vertical-align: -0.1em !important;
  margin: 0 0.07em !important;
  background: none !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  max-width: 1em !important;
  max-height: 1em !important;
}
