/* ==========================================================
   ADM NEWS — UNIFIED VISUAL & ZOOM SYSTEM (FINAL FULL SHEET)
   Posts + Archives + Slider + Mobile + Spot‑Zoom + Glare
   ========================================================== */


/* ----------------------------------------------------------
   ADM NEWS — DESKTOP POST (FINAL COMPLETE SHEET)
   16:9 grey frame + 90% image + spot‑zoom + cursors
   ---------------------------------------------------------- */

@media (min-width: 992px) {

  /* 1. 16:9 GREY FRAME (MASTER CONTAINER) */
  .single .entry-thumbnail-area {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;        /* FIXED GEOMETRY */
    background-color: #e5e5e5;   /* GREY FRAME */
    overflow: hidden;            /* IMAGE STAYS INSIDE */
    border-radius: 2px;
    margin: 30px auto;
    cursor: url(https://abudhabimagazine.ae/wp-content/uploads/2026/01/icons8-zoom-in-24.png) 16 16, zoom-in;
  }

  /* 2. IMAGE INSIDE FRAME (90% × 90%) */
  .single .entry-thumbnail-area img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 90% !important;
    height: 90% !important;
    object-fit: contain !important;      /* DESKTOP = COVER */
    object-position: center !important;
    transform-origin: center center;
    transition: transform 0.35s ease-out;
    z-index: 2;

    cursor: url(https://abudhabimagazine.ae/wp-content/uploads/2026/01/icons8-zoom-in-24.png) 16 16, zoom-in;
  }
}


/* ----------------------------------------------------------
   ADM NEWS — MOBILE POST (FINAL COMPLETE SHEET)
   4:3 grey frame + 90% image + tap‑zoom
   ---------------------------------------------------------- */

@media (max-width: 991px) {

  /* 1. 4:3 GREY FRAME (MASTER CONTAINER) */
  .single .entry-thumbnail-area {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;          /* FIXED GEOMETRY */
    background-color: #e5e5e5;    /* GREY FRAME */
    overflow: hidden;             /* IMAGE STAYS INSIDE */
    border-radius: 2px;
    margin: 20px auto;

    cursor: default !important;
  }

  /* 2. IMAGE INSIDE FRAME (90% × 90%) */
  .single .entry-thumbnail-area img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 90% !important;
    height: 90% !important;
    object-fit: cover !important;       /* MOBILE = COVER */
    object-position: center !important;
    transform-origin: center center;
    transition: transform 0.35s ease-out;
    z-index: 2;

    pointer-events: auto; /* TAP TARGET */
  }

  /* 3. OPTIONAL TOUCH GLARE (SUBTLE) */
  .single .entry-thumbnail-area::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      120deg,
      rgba(255,255,255,0.0) 0%,
      rgba(255,255,255,0.25) 50%,
      rgba(255,255,255,0.0) 100%
    );
    opacity: 0;
    transition: opacity 0.25s ease-out;
    pointer-events: none;
    z-index: 3;
  }

  .single .entry-thumbnail-area:active::after {
    opacity: 1;
  }
}


/* ----------------------------------------------------------
   GLOBAL TRANSITION (NO SIZING HERE)
   ---------------------------------------------------------- */

.single .entry-thumbnail-area img {
  transition: transform 0.25s ease-out;
  will-change: transform;
}


/* ----------------------------------------------------------
   POINTER‑EVENTS SAFETY (DESKTOP + MOBILE)
   ---------------------------------------------------------- */

.single .entry-thumbnail-area * {
  pointer-events: none;
}

.single .entry-thumbnail-area img {
  pointer-events: auto;
}


/* CLICK FIX — Ensure zoom triggers on the image (desktop) */
@media (min-width: 992px) {

  .single .entry-thumbnail-area * {
    pointer-events: none;
  }

  .single .entry-thumbnail-area img {
    pointer-events: auto;
  }
}


/* ----------------------------------------------------------
   ADM ZOOM + HI‑RES + STATIC GLARE (INTEGRATED)
   ---------------------------------------------------------- */

/* Zoom state (spot‑zoom, no panning) */
.single .entry-thumbnail-area.adm-zoom-active img {
  cursor: zoom-out;
}

/* Hi‑res overlay */
.adm-zoom-hires {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  transform: translate(-50%, -50%);
  max-width: none;
  max-height: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease-out;
  z-index: 4;
}

.adm-zoom-hires.adm-zoom-hires-visible {
  opacity: 1;
}

/* Static glare layer */
.adm-zoom-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    130deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.25s ease-out;
  z-index: 5;
}

.single .entry-thumbnail-area.adm-zoom-active .adm-zoom-glare {
  opacity: 1;
}


/* ----------------------------------------------------------
   ADM — 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%;
  }

  /* THE REAL ADM UNIFIED IMAGE FRAME */
  .archive .rt-post .post-img,
  .blog .rt-post .post-img,
  .category .rt-post .post-img {
    width: 100%;
    height: 220px; /* FIXED HEIGHT — 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; /* perfect crop */
    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;
  }
}


/* --------------------------------------------- */
/* UNIVERSAL 16:9 FRAME (ADM THUMB BOX)         */
/* --------------------------------------------- */

.adm-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #e5e5e5; /* Neutral grey frame */
}

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


/* --------------------------------------------- */
/* ARCHIVE THUMBNAILS — FULL 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: cover;
  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;
}


/* ------------------------------------------------------ */
/* FORCE UNIFORM 4:3 BOX EVEN IF IMAGE IS SMALL           */
/* ------------------------------------------------------ */

.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;
  }
}


/* ------------------------------------------------------ */
/* MOBILE ARCHIVE — LIMIT TITLES TO ~10 WORDS             */
/* ------------------------------------------------------ */

@media (max-width: 767px) {

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


/* ------------------------------------------------------ */
/* MOBILE ARCHIVE — REMOVE AUTHOR                        */
/* ------------------------------------------------------ */

@media (max-width: 767px) {

  .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;
  }
}


/* ------------------------------------------------------ */
/* MOBILE ARCHIVE — TOP SPACING                          */
/* ------------------------------------------------------ */

@media (max-width: 767px) {

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


/* ------------------------------------------------------ */
/* MOBILE SINGLE — TITLE & IMAGE SPACING                 */
/* ------------------------------------------------------ */

@media (max-width: 767px) {

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

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


/* ------------------------------------------------------ */
/* MOBILE SINGLE — REMOVE EXTRA WRAPPER SPACING          */
/* ------------------------------------------------------ */

@media (max-width: 767px) {

  .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;
  }
}

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

@media (max-width: 768px) {

    /* Hide entry meta (author, date, reading time) */
    .entry-meta {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Hide the banner wrapper */
    .entry-banner-content {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Hide breadcrumb containers */
    .breadcrumb-area,
    .entry-breadcrumb {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}