/*
Theme Name: LeoTheme
Theme URI: https://rayhaber.com/
Description: MH Magazine child theme for consistent 678x381 (16:9) featured images without destructive thumbnail cropping. Intended for RayHaber, RaillyNews and TeleferikHaber.
Author: LeoTheme Editorial
Template: mh-magazine
Version: 3.3.15
Requires PHP: 7.4
Text Domain: leotheme
*/

/* Parent MH Magazine stylesheet is loaded before these overrides. */

/* Consolidated styling: avoids an extra stylesheet request. */
/**
 * LeoTheme 1.4: MH Magazine featured image presentation.
 * Never distort or forcibly crop headline artwork.
 */

/* Article featured image: intrinsic ratio, edge-to-edge in content column. */
.single .entry-thumbnail,
.single-post .entry-thumbnail,
.single .entry-thumbnail a,
.single-post .entry-thumbnail a {
    width: 100%;
    max-width: 100%;
}
.single .entry-thumbnail img,
.single-post .entry-thumbnail img,
.single .entry-thumbnail .wp-post-image,
.single-post .entry-thumbnail .wp-post-image {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: initial !important;
    background: transparent !important;
}

/* Thumbnail slots retain a consistent 16:9 presentation without cropping. */
.mh-posts-grid-thumb img,
.mh-posts-list-thumb img,
.mh-posts-large-thumb img,
.mh-carousel-thumb img,
.mh-posts-focus-thumb img,
.mh-posts-lineup-thumb img,
.mh-posts-digest-thumb img,
.mh-posts-stacked-thumb img,
.mh-posts-horizontal-thumb img,
.mh-custom-posts-thumb img,
.mh-spotlight-thumb img,
.mh-category-columns-thumb img,
.mh-slider-widget .slides img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 678 / 381;
    object-fit: contain;
    object-position: center;
    background: #f0f1f2;
}

/* Optional blurred image edge-fill, applied only to image parents by LeoTheme JS. */
.leo-media-fill {
    position: relative !important;
    isolation: isolate;
    overflow: hidden;
    background: #edf0f2;
}
.leo-media-fill::before {
    content: '';
    position: absolute;
    inset: -12px;
    z-index: -1;
    background-image: var(--leo-image-url);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(12px) brightness(.88);
    pointer-events: none;
}
.leo-media-fill > img {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Keep the widget's dimensions stable and match the new thumb ratio. */
.mh-slider-widget,
.mh-slider-widget.mh-slider-normal { aspect-ratio: 678 / 381; }
.mh-posts-stacked-large::after,
.mh-posts-stacked-small::after { padding-top: 56.19469%; }
.mh-posts-stacked-overlay img,
.mh-posts-stacked-overlay .wp-post-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Images inserted in article body are not card thumbnails. */
.entry-content .wp-block-image img,
.entry-content .wp-block-gallery img,
.entry-content figure:not(.entry-thumbnail) img {
    width: auto;
    max-width: 100%;
    aspect-ratio: auto;
    height: auto;
    object-fit: initial;
    background: transparent;
}

/* Mobile carousel: show a whole readable story instead of two clipped cards. */
@media screen and (max-width: 620px) {
    .mh-carousel-widget { max-width: 100%; overflow: hidden; }
    .mh-carousel-widget .mh-carousel-thumb,
    .mh-carousel-widget .mh-carousel-thumb > a { display: block; width: 100%; }
    .mh-carousel-widget .mh-carousel-thumb img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 678 / 381;
        object-fit: contain;
    }
    .mh-carousel-layout2 .mh-carousel-title {
        font-size: 1.05rem;
        line-height: 1.35;
        overflow-wrap: break-word;
    }
    .mh-carousel-layout2 .mh-carousel-caption { margin-top: 8px; }
    .mh-carousel-widget .flex-direction-nav a { z-index: 5; }
}

/* Show the first slide while FlexSlider starts, rather than a blank rectangle.
 * Once FlexSlider wraps .slides with .flex-viewport this rule ceases to match. */
.mh-slider-widget:not(:has(.flex-viewport)) > .slides > li:first-child,
.mh-carousel-widget:not(:has(.flex-viewport)) > .slides > li:first-child { display: block; }


/* LeoTheme 2.0: optional infinite article reader; original post stays untouched. */
.leo-infinite-stream { clear:both; margin: 42px 0 0; }
.leo-infinite-article { padding: 30px 0 10px; margin: 0 0 30px; border-top: 3px solid #e6e6e6; scroll-margin-top: 20px; overflow-wrap: anywhere; }
.leo-infinite-next-label { color:#b51413; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.leo-infinite-article .entry-title { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.25; margin: 0 0 12px; }
.leo-infinite-article .entry-title a { color: inherit; text-decoration:none; }
.leo-infinite-meta { font-size:.85rem; color:#777; margin: 0 0 20px; }
.leo-infinite-categories:before { content:' · '; }
.leo-infinite-hero { margin: 0 0 20px; }
.leo-infinite-hero img { display:block; width:100%; height:auto; aspect-ratio:auto; object-fit:contain; }
.leo-infinite-article .entry-content { width:100%; }
.leo-infinite-original { clear:both; font-size:.85rem; margin-top:24px; }
.leo-infinite-status { padding: 15px 0 20px; color:#555; font-size:.9rem; min-height: 1em; }
.leo-infinite-status button { cursor:pointer; padding:5px 12px; background:transparent; color:inherit; border:1px solid #aaa; border-radius:3px; }
.leo-infinite-sentinel { height: 1px; }
@media (max-width: 620px) { .leo-infinite-article {padding-top:24px;} .leo-infinite-article .entry-title {font-size:1.65rem;} }

/* LeoTheme 2.0.2: compact hand-off between full news articles. */
.leo-infinite-stream.leo-infinite-compact {margin-top:0; padding-top:0;}
.leo-infinite-compact .leo-infinite-items {margin:0; padding:0;}
.leo-infinite-compact .leo-infinite-article {display:flow-root; margin:0; padding:14px 0 8px; border-top:2px solid #e6e6e6; min-height:0;}
.leo-infinite-compact .leo-infinite-article .entry-header {float:none; clear:none; min-height:0; margin:0 0 12px; padding:0;}
.leo-infinite-compact .leo-infinite-meta {margin-bottom:12px;}
.leo-infinite-compact .leo-infinite-hero {display:block; float:none; clear:none; width:100%; margin:0 0 16px; padding:0; min-height:0;}
.leo-infinite-compact .leo-infinite-hero a {display:block;}
.leo-infinite-compact .leo-infinite-hero img {display:block; width:100%; max-width:100%; height:auto; margin:0; padding:0;}
.leo-infinite-compact .leo-infinite-next-label {margin-bottom:8px;}
.leo-infinite-compact .leo-infinite-original {margin-top:12px;}
.leo-infinite-compact .leo-infinite-status:empty {display:none; padding:0; min-height:0;}
@media (max-width:620px) {.leo-infinite-compact .leo-infinite-article {padding-top:12px;}}

.leo-infinite-comment-link {margin:5px 0 10px; font-size:.82rem;}

/* LeoTheme 2.3: reserve stable header image space before images load.
   These selectors only affect thumbnail containers; no fixed height for article body. */
.mh-carousel-thumb,
.mh-posts-large-thumb,
.mh-posts-grid-thumb,
.mh-posts-list-thumb {
    aspect-ratio: 678 / 381;
}
.mh-carousel-thumb img,
.mh-posts-large-thumb img,
.mh-posts-grid-thumb img,
.mh-posts-list-thumb img {
    vertical-align: middle;
}
/* Show poster immediately but do not force an empty blank hero on article pages. */

/* LeoTheme 2.5.1: stable compact hand-off in the 900px reading layout.
   Keep float containment within each article, not across subsequent stories. */
body.single-post.leo-single-no-sidebar #main-content { display: flow-root; }
body.single-post.leo-single-no-sidebar #main-content > article { display: flow-root; margin-bottom:0; padding-bottom:0; }
body.single-post.leo-single-no-sidebar #main-content > article .entry-content { display: flow-root; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-comment-link { margin: 8px 0 6px; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-stream.leo-infinite-compact { clear:both; margin:0; padding:0; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-compact .leo-infinite-items { margin:0; padding:0; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-compact .leo-infinite-article { clear:both; margin:0; padding:12px 0 8px; min-height:0; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-compact .leo-infinite-article .entry-header { display:block; clear:both; height:auto; min-height:0; margin:0 0 10px; padding:0; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-compact .leo-infinite-hero { position:relative; display:block; clear:both; float:none; width:100%; height:auto; min-height:0; margin:0 0 14px; padding:0; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-compact .leo-infinite-hero img { display:block; width:100%; height:auto; max-height:none; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-compact .leo-infinite-meta { margin:0 0 12px; }
body.single-post.leo-single-no-sidebar #main-content .leo-infinite-compact .leo-infinite-next-label { margin:0 0 6px; }

/* LeoTheme 2.6.1: prevent mobile gaps around freshly appended story heroes.
   Do not alter genuine ad placements or the normal standalone article. */
@media screen and (max-width: 767px) {
  body.single-post .leo-infinite-compact .leo-infinite-article .entry-header,
  body.single-post .leo-infinite-compact .leo-infinite-article .leo-infinite-hero {
    min-height: 0 !important;
    max-height: none;
    margin-top: 0;
  }
  body.single-post .leo-infinite-compact .leo-infinite-hero img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
  }
}

/* LeoTheme 2.7: reduce expensive compositing on smaller screens. The
 * editorial thumbnail remains visible, with neutral edge padding only.
 * The JS skips applying blurred layers when mobile optimization is active. */
@media (max-width: 767px) {
  body.leo-mobile-lite-media .leo-media-fill::before { content: none !important; filter: none !important; }
  body.leo-mobile-lite-media .leo-media-fill { background: #edf0f2; }
}

/* LeoTheme 2.9.2: Homepage layout hotfix.
 * Keep the parent theme's intrinsic thumbnail/container dimensions for
 * list, grid and sidebar widgets. Earlier width:100% + aspect-ratio on
 * wrapper boxes could expand rows and create tall empty spaces.
 * Image aspect ratio is handled by the existing image rules above.
 */
/* Logo's 300x40 intrinsic ratio is known; provide a box before its PNG arrives.
 * Keep it responsive and avoid modifying logos used on other LeoTheme sites. */
body.home img[src*="raillynews_logo.png"],
body.home img[srcset*="raillynews_logo.png"] {
  aspect-ratio: 300 / 40;
  max-width: 100%;
  height: auto;
}

/* LeoTheme 2.9.5 — consistent thumbnails for ALL MH small-list widgets.
 * Important: do NOT style MH's large cards, carousel, slider or feature images.
 * Source thumbnails may differ (120x90 4:3 and 160x90 16:9).
 * A consistent visual frame with object-fit:contain preserves embedded headlines.
 * Restrict to small-card markup, not all .mh-widget img or all <li> elements.
 */
.mh-widget.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-small,
.mh-widget.mh_custom_pages .mh-custom-posts-item.mh-custom-posts-small {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: start;
    column-gap: 16px;
    min-width: 0;
    min-height: 0;
}
.mh-widget.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-small > .mh-custom-posts-thumb,
.mh-widget.mh_custom_pages .mh-custom-posts-item.mh-custom-posts-small > .mh-custom-posts-thumb {
    float: none;
    position: relative;
    display: block;
    width: 120px;
    height: 90px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.mh-widget.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-small > .mh-custom-posts-thumb a,
.mh-widget.mh_custom_pages .mh-custom-posts-item.mh-custom-posts-small > .mh-custom-posts-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}
.mh-widget.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-small > .mh-custom-posts-thumb img,
.mh-widget.mh_custom_pages .mh-custom-posts-item.mh-custom-posts-small > .mh-custom-posts-thumb img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
    background: #f3f4f6;
}
.mh-widget.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-small > :not(.mh-custom-posts-thumb),
.mh-widget.mh_custom_pages .mh-custom-posts-item.mh-custom-posts-small > :not(.mh-custom-posts-thumb) {
    min-width: 0;
    width: auto;
    overflow-wrap: break-word;
}
/* Small screens: preserve the two-column card layout without horizontal overflow. */
@media (max-width: 480px) {
    .mh-widget.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-small,
    .mh-widget.mh_custom_pages .mh-custom-posts-item.mh-custom-posts-small {
        grid-template-columns: 96px minmax(0, 1fr);
        column-gap: 12px;
    }
    .mh-widget.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-small > .mh-custom-posts-thumb,
    .mh-widget.mh_custom_pages .mh-custom-posts-item.mh-custom-posts-small > .mh-custom-posts-thumb {
        width: 96px;
        height: 72px;
    }
}


/* LeoTheme 2.9.6: RayHaber homepage CLS stabilization.
 * MH Custom Posts LARGE cards: allocate the media area before an image
 * arrives. This is deliberately separate from the 120x90 small-list rules.
 * The image is contained, not cropped, preserving headline lettering.
 */
body.home .mh-home-2.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-large .mh-custom-posts-thumb-xl {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    background: #f2f3f4;
}
body.home .mh-home-2.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-large .mh-custom-posts-thumb-xl > a {
    display: block;
    width: 100%;
    height: 100%;
}
body.home .mh-home-2.mh_custom_posts .mh-custom-posts-item.mh-custom-posts-large .mh-custom-posts-thumb-xl img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 4 / 3;
    object-fit: contain !important;
    object-position: center;
}
/* Reserve the intrinsic 10:1 RayHaber logo ratio without sizing other brands. */
body.home img[src*="RayHaber_Logo_.png"] {
    aspect-ratio: 10 / 1;
    max-width: 100%;
    height: auto;
}


/* LeoTheme 3.0.1: preserve the intrinsic proportions of photos embedded
 * inside full articles.  MH Magazine / WP block wrappers and inline styles
 * must not stretch landscape photos vertically.  This deliberately excludes
 * featured images, MH homepage widgets, sliders and editorial carousels.
 * src width/height attributes continue to reserve layout space (CLS).
 */
body.single-post .entry-content figure.wp-block-image,
body.single-post .entry-content .wp-block-image,
body.single-post .entry-content figure.wp-block-gallery,
body.single-post .entry-content .wp-block-gallery,
body.single-post .entry-content .wp-caption {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}
body.single-post .entry-content figure.wp-block-image img,
body.single-post .entry-content .wp-block-image img,
body.single-post .entry-content figure.wp-block-gallery img,
body.single-post .entry-content .wp-block-gallery img,
body.single-post .entry-content .wp-caption img,
body.single-post .entry-content > p > img,
body.single-post .entry-content > a > img,
body.single-post .leo-infinite-article .entry-content img {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center;
}
/* Allow block images wider than the reading column to scale down cleanly. */
body.single-post .entry-content figure.wp-block-image > img,
body.single-post .entry-content figure.wp-block-image > a > img {
    width: 100% !important;
}

/* LeoTheme 3.1.2 Smart Archive Scroll: category and dedicated posts index only. */
:is(.category,.blog) .leo-archive-batch { clear: both; }
:is(.category,.blog) .leo-archive-batch::after { content: ""; display: table; clear: both; }
:is(.category,.blog) .leo-archive-batch + .leo-archive-batch { padding-top: 18px; }
:is(.category,.blog) .leo-archive-loading { min-height: 1px; text-align: center; font-size: 14px; }
:is(.category,.blog) .leo-archive-loading:not(:empty) { padding: 16px 0; }
:is(.category,.blog) .leo-archive-actions { text-align: center; margin: 18px 0 24px; }
:is(.category,.blog) .leo-archive-actions[hidden] { display: none !important; }
:is(.category,.blog) .leo-archive-more { border: 0; background: #cc1515; color: white; cursor: pointer; font: inherit; font-weight: 700; padding: 13px 22px; border-radius: 3px; }
:is(.category,.blog) .leo-archive-more:focus-visible { outline: 3px solid #222; outline-offset: 3px; }
:is(.category,.blog) .leo-archive-more[disabled] { opacity: .6; cursor: progress; }
body:is(.category,.blog).leo-archive-js .leo-archive-native-pagination { display: none; }

/* LeoTheme 3.1.1 - stable, compact archive card layout.
 * Scoped strictly to enhanced category archives; homepage widgets and
 * standalone article images are unaffected. Reserve all thumbnail boxes
 * before load, eliminate parent layout1/layout2/layout3 variations.
 */
body:is(.category,.blog) #leo-archive-results .leo-archive-card {
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    column-gap: 20px;
    width: 100%;
    margin: 0 0 20px;
    padding: 0 0 20px;
    border-bottom: 1px solid #ececec;
    min-width: 0;
    float: none !important;
    clear: both;
}
body:is(.category,.blog) #leo-archive-results .leo-archive-card-media {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f1f2f4;
    position: relative;
    margin: 0;
    padding: 0;
}
body:is(.category,.blog) #leo-archive-results .leo-archive-card-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
body:is(.category,.blog) #leo-archive-results .leo-archive-card-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}
body:is(.category,.blog) #leo-archive-results .leo-archive-card-info {
    display: block;
    min-width: 0;
    float: none;
    overflow-wrap: anywhere;
}
body:is(.category,.blog) #leo-archive-results .leo-archive-card-title {
    font-size: clamp(17px, 1.65vw, 22px);
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 8px;
    padding: 0;
}
body:is(.category,.blog) #leo-archive-results .leo-archive-card-title a { text-decoration: none; }
body:is(.category,.blog) #leo-archive-results .leo-archive-card-meta {
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 7px;
}
body:is(.category,.blog) #leo-archive-results .leo-archive-card-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #444;
}
@media (max-width: 767px) {
    body:is(.category,.blog) #leo-archive-results .leo-archive-card {
        grid-template-columns: 148px minmax(0, 1fr);
        column-gap: 13px;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    body:is(.category,.blog) #leo-archive-results .leo-archive-card-title { font-size: 16px; }
    body:is(.category,.blog) #leo-archive-results .leo-archive-card-summary {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        font-size: 13px;
    }
}
@media (max-width: 480px) {
    body:is(.category,.blog) #leo-archive-results .leo-archive-card { grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; }
    body:is(.category,.blog) #leo-archive-results .leo-archive-card-title { font-size: 15px; line-height: 1.32; }
    body:is(.category,.blog) #leo-archive-results .leo-archive-card-summary { display: none; }
}

/* LeoTheme 3.2.1 — TeleferikHaber homepage CLS experiment.
 * The MH Carousel in Home 1 precedes .mh-home-columns. Reserve the carousel's
 * image-and-caption footprint before FlexSlider and web fonts finish loading,
 * without constraining article bodies or changing widget thumbnail ratios.
 * Scope to this site's current carousel widget to avoid affecting other sites.
 */
body.leo-site-teleferikhaber.home #mh_carousel-2.mh-home-1.mh_carousel {
    min-height: 228px;
}
body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-widget,
body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-widget .slides {
    min-height: 206px;
}
body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 0;
}
body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-thumb a {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}
body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-thumb img {
    width: 100%;
    height: 100% !important;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}
/* Logo is a verified 468 x 60 WebP asset; reserve ratio before decoding.
 * Avoid global header/logo overrides that could shift other publishers. */
body.leo-site-teleferikhaber .mh-site-logo img[src*="/teleferikhaber.webp"],
body.leo-site-teleferikhaber .mh-site-logo img[src*="/teleferikhaber-logo.webp"],
body.leo-site-teleferikhaber .mh-header-image[src*="/teleferikhaber.webp"] {
    display: inline-block;
    aspect-ratio: 39 / 5;
    max-width: 100%;
    height: auto;
}
@media (max-width: 767px) {
    body.leo-site-teleferikhaber.home #mh_carousel-2.mh-home-1.mh_carousel { min-height: 0; }
    body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-widget,
    body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-widget .slides { min-height: 0; }
}


/* LeoTheme 3.2.3 - TeleferikHaber mobile carousel first-paint stabilization.
 * The carousel lives in Home 1, above .mh-home-columns. Constrain only the
 * verified widget on phones, keeping desktop's tested 0.02 CLS untouched.
 * Reserve image area even when the initial WebP hasn't decoded yet.
 */
@media screen and (max-width: 620px) {
 body.leo-site-teleferikhaber.home #mh_carousel-2.mh-home-1.mh_carousel {
   min-height: 0;
   width: 100%;
 }
 body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-widget {
   width: 100%;
   max-width: 100%;
   overflow: hidden;
 }
 body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-thumb,
 body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-thumb > a {
   display: block;
   width: 100%;
   height: auto;
   aspect-ratio: 16 / 9;
   overflow: hidden;
 }
 body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-thumb img {
   display: block;
   width: 100%;
   height: 100% !important;
   aspect-ratio: 16 / 9;
   object-fit: contain;
 }
 body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-title {
   font-size: 1.05rem;
   line-height: 1.35;
   min-height: 0;
   max-height: 4.05em;
   overflow: hidden;
 }
 body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-caption {
   min-height: 4.5em;
   margin-top: 8px;
 }
 /* Before FlexSlider runs, show one correctly-sized slide, not a row of
    188px desktop cards which later pushes the next homepage section down. */
 body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-widget:not(:has(.flex-viewport)) > ul.slides > li {
   display: none;
 }
 body.leo-site-teleferikhaber.home #mh_carousel-2 .mh-carousel-widget:not(:has(.flex-viewport)) > ul.slides > li:first-child {
   display: block;
   width: 100% !important;
   margin-right: 0 !important;
 }
}

/* LeoTheme 3.2.4 – TeleferikHaber mobile article-gap safeguard.
 * Google Auto Ads may leave a large reserved box when it explicitly reports
 * an unfilled placement. Only collapse a confirmed unfilled ad, never a
 * pending/filled impression. Keep article images and legitimate ads intact.
 * :has() only removes the dedicated one-child wrapper, not editorial content.
 */
@media (max-width: 767px) {
  body.leo-site-teleferikhaber.single-post .entry-content ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.leo-site-teleferikhaber.single-post .entry-content :is(div, p):has(> ins.adsbygoogle[data-ad-status="unfilled"]:only-child) {
    min-height: 0 !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  body.leo-site-teleferikhaber.single-post .entry-content figure.wp-block-image {
    float: none;
    clear: both;
    position: static;
    margin-top: 1em;
    margin-bottom: 1em;
  }
}

/* OtobanHaber 3.2.4.1: keep Posts 2 ad widgets between continuous articles. */
.leo-infinite-post2-widgets { clear:both; margin:14px 0 18px; }
.leo-infinite-post2-widgets .adsbygoogle { max-width:100%; }

/* LeoTheme 3.3.1 — confirmed unfilled AdSense slots on article pages.
 * Do not change Ads that are pending or filled. Scope to the two sites
 * reporting gaps; avoid global height overrides on editorial images.
 */
:is(body.leo-site-teleferikhaber, body.leo-site-otonomhaber).single-post #main-content
  ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Auto Ads often place an empty ad inside a tall injected wrapper. Only
 * suppress wrappers containing a *confirmed* unfilled slot. */
:is(body.leo-site-teleferikhaber, body.leo-site-otonomhaber).single-post #main-content
  .entry-content .google-auto-placed:has(ins.adsbygoogle[data-ad-status="unfilled"]),
:is(body.leo-site-teleferikhaber, body.leo-site-otonomhaber).single-post #main-content
  .entry-content :is(div,p):has(> ins.adsbygoogle[data-ad-status="unfilled"]:only-child),
:is(body.leo-site-teleferikhaber, body.leo-site-otonomhaber).single-post #main-content
  .entry-content :is(div,p):has(> ins.adsbygoogle[data-ad-status="unfilled"] + script:last-child) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* The dedicated Posts 2 widgets contain only one manual AdSense unit
 * on these two sites; keep the filled slot and infinite stream intact. */
:is(body.leo-site-teleferikhaber, body.leo-site-otonomhaber).single-post #main-content
  :is(.leo-infinite-post2-widgets,.entry-content,article) .widget_custom_html:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* LeoTheme 3.3.2 — article image geometry, TeleferikHaber & OtonomHaber.
 * WordPress supplies source width/height. Do not impose thumbnail/card ratios
 * on editorial images. The JS companion reads each image's own dimensions.
 * This is intentionally limited to single-post article bodies. */
:is(body.leo-site-teleferikhaber,body.leo-site-otonomhaber).single-post
  .entry-content :is(p,figure.wp-block-image,figure.wp-caption) > img,
:is(body.leo-site-teleferikhaber,body.leo-site-otonomhaber).single-post
  .entry-content figure.wp-block-image > a > img {
  display: block !important;
  box-sizing: border-box;
  width: min(100%, var(--leo-editorial-image-width, 100%)) !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
}

/* LeoTheme 3.3.3: AdanaMersin only — editorial images use actual dimensions.
 * Excludes slider, featured hero, ads, and image cards. */
body.leo-site-adanamersin.single-post .entry-content :is(p,figure.wp-block-image,figure.wp-caption) > img,
body.leo-site-adanamersin.single-post .entry-content figure.wp-block-image > a > img {
 display: block !important; box-sizing: border-box; width: 100% !important;
 max-width: 100% !important; height: auto !important; min-height: 0 !important;
 max-height: none !important; object-fit: contain !important;
}
body.leo-site-adanamersin.single-post .entry-content figure.wp-block-image {
 float: none; clear: both; position: static; margin: 1.25em 0; height: auto; min-height: 0;
}
