/* ==========================================================
   ADM NEWS — REMOVE ALL SCROLL‑LOCK (DESKTOP + MOBILE)
   ========================================================== */

html,
body,
body.home {
  overflow: auto !important;
  height: auto !important;
}


/* ==========================================================
   ADM NEWS — ARCHIVE UNIFIED GEOMETRY (DESKTOP)
   ========================================================== */

@media (min-width: 1025px) {

  /* 3-column unified grid */
  .archive .rt-post-grid,
  .blog .rt-post-grid,
  .category .rt-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
  }

  /* Unified card container */
  .archive .rt-post,
  .blog .rt-post,
  .category .rt-post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  /* ADM unified image frame */
  .archive .rt-post .post-img,
  .blog .rt-post .post-img,
  .category .rt-post .post-img {
    width: 100%;
    height: 220px; /* ADM signature */
    background: #f2f2f2;
    overflow: hidden;
    position: relative;
  }

  .archive .rt-post .post-img img,
  .blog .rt-post .post-img img,
  .category .rt-post .post-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  /* Unified title spacing */
  .archive .rt-post .entry-title,
  .blog .rt-post .entry-title,
  .category .rt-post .entry-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin: 14px 16px 10px;
    min-height: 56px;
    display: flex;
    align-items: flex-start;
  }

  /* Unified meta spacing */
  .archive .rt-post .post-meta,
  .blog .rt-post .post-meta,
  .category .rt-post .post-meta {
    margin: 0 16px 16px;
    font-size: 13px;
    color: #666;
    min-height: 20px;
    display: flex;
    align-items: center;
  }
}


/* ==========================================================
   ADM NEWS — UNIVERSAL 16:9 FRAME (ADM THUMB BOX)
   ========================================================== */

.adm-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #eee;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Remove any old blur logic */
.adm-thumb-box::before {
  display: none !important;
}

.adm-thumb-box img.adm-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  background: transparent !important;
  display: block;
}


/* ==========================================================
   ADM NEWS — ARCHIVE THUMBNAILS (COVER + DARKENING)
   ========================================================== */

.archive .adm-thumb-img,
.blog .adm-thumb-img,
.category .adm-thumb-img,
.rt-post-grid .adm-thumb-img,
.rt-post-list .adm-thumb-img,
.rt-related-post .adm-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}

/* Dark gradient overlay for readability */
.archive .adm-thumb-box::after,
.blog .adm-thumb-box::after,
.category .adm-thumb-box::after,
.rt-post-grid .adm-thumb-box::after,
.rt-post-list .adm-thumb-box::after,
.rt-related-post .adm-thumb-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.55)
  );
  z-index: 2;
}


/* ==========================================================
   ADM NEWS — UNIFORM 4:3 BOX (RT GRID)
   ========================================================== */

.rt-post-grid-default .rt-item .rt-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #e5e5e5;
  min-height: 0 !important;
  min-width: 0 !important;
  height: auto !important;
}

/* Make the image fill the box */
.rt-post-grid-default .rt-item .rt-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

@media (max-width: 767px) {
  .rt-post-grid-default .rt-item {
    margin-bottom: 20px;
  }

  .rt-post-grid-default .rt-item .entry-title a {
    -webkit-line-clamp: 2;
  }
}


/* ==========================================================
   ADM NEWS — MOBILE ARCHIVE TWEAKS
   ========================================================== */

@media (max-width: 767px) {

  /* Limit titles to ~10 words */
  .archive .entry-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
  }

  /* Remove author */
  .archive .entry-meta .post-author,
  .blog .entry-meta .post-author,
  .category .entry-meta .post-author,
  .rt-post-grid .entry-meta .post-author,
  .rt-post-list .entry-meta .post-author,
  .rt-related-post .entry-meta .post-author {
    display: none !important;
  }

  /* Top spacing */
  #primary.content-area.normal {
    padding-top: 20px !important;
    margin-top: 0 !important;
  }

  .rt-cat-description {
    display: none !important;
  }
}


/* ==========================================================
   ADM NEWS — MOBILE SINGLE SPACING
   ========================================================== */

@media (max-width: 767px) {

  /* Space below H1 */
  .single-post .entry-title {
    margin-bottom: 10px !important;
  }

  /* Space above featured image */
  .single-post .post-thumbnail,
  .single-post .adm-thumb-box {
    margin-top: 0 !important;
  }

  /* Remove extra wrapper spacing */
  .single-post .entry-header,
  .single-post .post-header,
  .single-post .post-inner,
  .single-post .post-content,
  .single-post .post-details,
  .single-post .site-main,
  .single-post .content-area,
  .single-post .rt-container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .single-post .post-thumbnail,
  .single-post .adm-thumb-box {
    margin-top: 0 !important;
  }
}


/* ==========================================================
   ADM NEWS — FEATURED IMAGE BACKGROUND TRANSITION
   ========================================================== */

.single .entry-thumbnail-area {
  transition: background-color 0.4s ease;
}


/* ==========================================================
   ADM NEWS — DESKTOP POST SYSTEM (16:9 + 90% CONTAIN)
   ========================================================== */

@media (min-width: 992px) {

  /* 1. 16:9 frame */
  .single .entry-thumbnail-area {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #e5e5e5;
    overflow: hidden;
    border-radius: 2px;
    margin: 30px auto;
    cursor: default !important; /* CLEAN — no zoom cursor */
  }

  /* 2. Base image (100% × 100%, contain) */
  .single .entry-thumbnail-area img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.35s ease-out, opacity 0.2s ease-out;
    z-index: 2;
    cursor: default !important; /* CLEAN — no zoom cursor */
  }
}


/* ==========================================================
   ADM NEWS — MOBILE POST SYSTEM (4:3 + 90% CONTAIN)
   ========================================================== */

@media (max-width: 991px) {

  /* 1. 4:3 frame */
  .single .entry-thumbnail-area {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #e5e5e5;
    overflow: hidden;
    border-radius: 2px;
    margin: 20px auto;
    cursor: default !important;
  }

  /* 2. Base image (100% × 100%, contain) */
  .single .entry-thumbnail-area img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.35s ease-out, opacity 0.2s ease-out;
    z-index: 2;
    pointer-events: auto;
  }

./* ------------------------------------------------------ */
/* ADM SPOT‑ZOOM — Desktop Cursor & Image Transitions     */
/* ------------------------------------------------------ */

.entry-thumbnail-area,
.adm-spotzoom {
    cursor: zoom-in;
    overflow: hidden;
    position: relative;
}

.entry-thumbnail-area.zoom-active,
.adm-spotzoom.zoom-active {
    cursor: zoom-out;
}

.entry-thumbnail-area img,
.adm-spotzoom img {
    width: 100%;
    height: auto;
    transition: transform 0.25s ease-out;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    backface-visibility: hidden;
    will-change: transform;
}