/* =========================================================
   HERO LAYOUT SWITCH
   Desktop default — mobile hidden
========================================================= */

.jy-mobile-only { display: none; }
.jy-desktop-only { display: block; }
.jy-top-ad { display: none; }

/* =========================================================
   DESKTOP / TABLET HERO GRID
========================================================= */

.jy-hero-news {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;

  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 22px;
  align-items: start;
}


/* ===== LEFT BIG FEATURE ===== */

.jy-hero-left {
  grid-column: 1;
  grid-row: 1;
}

.jy-hero-big {
  position: relative;
  overflow: hidden;
}

.jy-hero-big img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}


/* Overlay */

.jy-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff;
}

.jy-cat-badge {
  background: #facc15;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  text-transform: uppercase;
}

.jy-overlay h2 {
  font-size: 26px;
  margin-top: 10px;
  line-height: 1.25;
}

.jy-overlay a {
  color: #fff;
  text-decoration: none;
}


/* ===== MIDDLE COLUMN ===== */

.jy-hero-middle {
  grid-column: 2;
  grid-row: 1;

  display: flex;
  flex-direction: column;
  gap: 18px;
}

.jy-text-feature h3 {
  font-size: 20px;
  line-height: 1.35;
}

.jy-text-feature p {
  font-size: 13px;
  color: #6b7280;
}

.jy-cat-label {
  font-size: 11px;
  color: #0a58ff;
  font-weight: 700;
  text-transform: uppercase;
}


/* Small list */

.jy-hero-list {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.jy-hero-list img {
  width: 80px;
  height: 65px;
  object-fit: cover;
}


/* ===== RIGHT SIDEBAR ===== */

.jy-hero-sidebar {
  grid-column: 3;
  grid-row: 1 / span 2;

  display: flex;
  flex-direction: column;
  gap: 16px;
}


/* Mini items */

.jy-mini-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.jy-mini-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.jy-post-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jy-mini-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0a58ff;
}

.jy-post-meta h5 {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}

.jy-mini-item + .jy-mini-item {
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
}


/* Sidebar ad */

.jy-side-ad-square {
  background: #e5e7eb;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #6b7280;
}


/* ===== BOTTOM GRID ===== */

.jy-hero-bottom {
  grid-column: 1 / span 2;
  grid-row: 2;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.jy-hero-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.jy-card-img {
  position: relative;
}

.jy-grid-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #facc15;
  color: #000;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.jy-hero-card h4 {
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.35;
}



/* =========================================================
   TABLET OPTIMIZATION (still desktop layout)
========================================================= */

@media (max-width: 1024px) {

  .jy-hero-news {
    grid-template-columns: 1.6fr 1fr;
  }

  .jy-hero-sidebar {
    display: none;
  }

  .jy-hero-bottom {
    grid-template-columns: repeat(2, 1fr);
      display: none;
    
  }

}



/* =========================================================
   MOBILE LAYOUT (≤768px)
========================================================= */

@media (max-width: 768px) {

  /* SWITCH LAYOUTS */

  .jy-mobile-only { display: block; }
  .jy-desktop-only { display: none; }

  body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #f6f7f9;
  }


  /* ===== MOBILE HERO WRAPPER ===== */

  .jy-mobile-hero {
    background: #fff;
    padding: 14px;
  }


  /* ===== FEATURED POST ===== */

  .jy-mobile-featured {
    margin-bottom: 24px;
  }

  .jy-mobile-featured img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 12px;
  }

  .jy-mobile-category {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #0a58ff;
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  .jy-mobile-featured h2 {
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
  }


  /* ===== LIST POSTS ===== */

  .jy-mobile-item {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    align-items: flex-start;
  }

  .jy-mobile-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .jy-mobile-item-text {
    flex: 1;
    min-width: 0;
  }

  .jy-mobile-item h3,
  .jy-mobile-item a {
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

}


/* =========================================
   HOMEPAGE MID AD (FRONT PAGE ONLY)
========================================= */

.jy-home-mid-ad {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;

  background: #f1f5f9;
}

/* Ensure ad scales properly */

.jy-home-mid-ad > * {
  max-width: 100%;
  display: inline-block;
}

/* Optional label */

.jy-home-mid-ad::before {
  content: "Advertisement";
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

@media (max-width: 768px) {

  .jy-home-mid-ad {
    margin: 24px auto;
    padding: 14px;
  }

}





/* =========================================================
   HOME SECTION — POST LIST + SIDEBAR
   (AFTER HERO)
========================================================= */

.jy-home-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}


/* ===== MAIN GRID ===== */

.jy-home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}


/* =========================================================
   LEFT COLUMN — POST LIST
========================================================= */

.jy-home-main {
  width: 100%;
}


/* SECTION HEADER */

.jy-section-header {
  display: flex;
  align-items: flex-end;
  margin-bottom: 26px;
}

.jy-section-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 8px;
  line-height: 1.25;
}


/* CATEGORY BADGE (LEFT) */

.jy-section-header .jy-badge {
  background: var(--color-primary);
  color: #fff;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}


/* HORIZONTAL LINE */

.jy-section-header::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--color-muted);
  opacity: .6;
  margin-left: 0;
}

/* POST ROW */

.jy-post-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  margin-bottom: 28px;
  align-items: start;
}


/* IMAGE */

.jy-post-row img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}


/* TEXT */

.jy-post-content h3 {
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 6px;
  font-weight: 700;
}

.jy-post-content h3 a {
  text-decoration: none;
}

.jy-post-content h3 a:hover {
  color: var(--color-primary);
}


/* META */

.jy-post-content .jy-meta {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}


/* EXCERPT */

.jy-post-content p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
}


/* =========================================================
   RIGHT SIDEBAR — FEATURED CARD
========================================================= */

.jy-home-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}


/* FEATURED CARD */

.jy-featured-card {
  padding: 20px;
  position: static;
  top: 20px; 
  align-self: start; 
}

.jy-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0,0,0,.10);
}



/* TITLE */

.jy-featured-card h3 {
  font-size: 20px;
  line-height: 1.35;
  margin: 12px 0 14px;
  font-weight: 700;
}

.jy-featured-card h3 a {
  text-decoration: none;
}


/* IMAGE */

.jy-featured-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 14px;
}


/* EXCERPT */

.jy-featured-card p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1024px) {

  .jy-home-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
  }

  .jy-post-row {
    grid-template-columns: 220px 1fr;
  }

  .jy-post-row img {
    height: 150px;
  }

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 768px) {

  .jy-home-section {
    margin: 28px auto;
  }

  .jy-home-grid {
    grid-template-columns: 1fr;
  }

  .jy-home-sidebar {
    align-self: start;
    margin-top: 20px;
    height: fit-content;
  }

  .jy-post-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .jy-post-row img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .jy-post-content h3 {
    font-size: 18px;
  }

  .jy-featured-card img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

}




/* =========================================
   MULTI-COLUMN MAIN AREA
========================================= */

.jy-main-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}


/* BIG POSTS */

.jy-post-thumb {
  position: relative;
}

.jy-post-thumb img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 12px;
}

.jy-big-post h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.jy-big-post p {
  font-size: 14px;
  color: var(--color-muted);
}


/* SMALL POSTS */

.jy-small-post {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.jy-small-post img {
  width: 80px;
  height: 70px;
  object-fit: cover;
}

.jy-small-post h4 {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}

.jy-date {
  font-size: 12px;
  color: var(--color-muted);
}


/* CATEGORY BADGE ON IMAGE */

.jy-img-cat {
  position: absolute;
  bottom: 10px;
  left: 10px;

  background: var(--color-text);
  color: #fff;

  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;

}


/* TECH GRID SIDEBAR */

.jy-tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.jy-mini-thumb {
  position: relative;
}

.jy-mini-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 6px;
}

.jy-tech-card h5 {
  font-size: 13px;
  line-height: 1.3;
  margin: 0;
}


/* RESPONSIVE */

@media (max-width: 1024px) {
  .jy-home-grid {
    grid-template-columns: 1fr;
  }

  .jy-main-columns {
    grid-template-columns: 1fr;
  }
}





/* =========================================
   LATEST ARTICLES GRID
========================================= */

.jy-latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}


/* CARD */

.jy-latest-thumb {
  position: relative;
}

.jy-latest-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 10px;
}

.jy-latest-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.jy-date {
  font-size: 12px;
  color: var(--color-muted);
}


/* CATEGORY BADGE ON IMAGE */

.jy-img-cat {
  position: absolute;
  bottom: 8px;
  left: 8px;

  background: var(--color-text);
  color: #fff;

  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;

}


/* =========================================
   MOST POPULAR LIST
========================================= */

.jy-popular-item {    /* Reuse .jy-mini-item styles for layout */
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.jy-popular-item img { /* Reuse .jy-mini-item styles for layout */
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.jy-popular-item h4 { /* Reuse .jy-mini-item styles for layout */
  font-size: 14px;
  line-height: 1.35;
  margin: 0 0 4px;
}


/* PAGINATION */

.jy-pagination {
  margin-top: 28px;
}

.jy-pagination a,
.jy-pagination span {
  padding: 6px 10px;
  margin-right: 6px;
  background: #e5e7eb;
  text-decoration: none;
  font-size: 13px;
}

.jy-pagination .current {
  background: var(--color-primary);
  color: #fff;
}



/* =========================================
   MOBILE — LATEST ARTICLES → LIST STYLE
========================================= */

@media (max-width: 768px) {

  .jy-latest-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .jy-latest-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
  }

  @media (max-width: 768px) {

  .jy-latest-card + .jy-latest-card {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
  }

}


  /* IMAGE */

  .jy-latest-thumb {
    width: 120px;
    flex-shrink: 0;
  }

  .jy-latest-thumb img {
    width: 100%;
    height: 85px;
    aspect-ratio: auto;
    object-fit: cover;
    margin: 0;
  }

  /* TEXT */

  .jy-latest-card h3 {
    font-size: 16px;
    line-height: 1.35;
    margin: 0 0 4px;
  }



  .jy-date {
    display: none;
  }



}

