/* =================================================
GLOBAL
================================================= */
.ok-home{
  width:100%;
  max-width:1180px;
  margin:auto;
  padding:10px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

img{width:100%;height:auto;display:block;border-radius:12px;}
a{text-decoration:none;color:inherit;}
h2,h3,h4{margin:0;line-height:1.3}


/* =================================================
SECTIONS
================================================= */
.ok-section{margin:28px 0;}
.ok-section.ok-dark{background:#0f172a;padding:18px;border-radius:18px;color:#fff;}

.ok-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}

.ok-head h2{
  font-size:22px;
  font-weight:800;
  position:relative;
  padding-left:12px;
}

.ok-head h2::before{
  content:"";
  position:absolute;
  left:0;top:2px;
  height:22px;width:4px;
  background:#e11d48;
  border-radius:10px;
}

.ok-head a{
  color:#e11d48;
  font-weight:700;
  font-size:15px;
}


/* =================================================
LATEST GRID (BASE)
================================================= */
.ok-latest-grid{
  display:grid;
  gap:22px;
}

.ok-latest-card{
  background:#fff;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
  display:flex;
  flex-direction:column;
}

.ok-latest-card img{
  height:220px;
  object-fit:cover;
}

.ok-featured-content{padding:16px 16px 18px;}

.ok-featured-title{
  font-size:20px;
  font-weight:700;
  color:#1f1f1f;
  margin-bottom:10px;
}

.ok-featured-excerpt{
  font-size:15px;
  line-height:1.6;
  color:#555;
  margin-bottom:12px;
}

.ok-featured-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  font-size:13px;
  color:#777;
  margin-bottom:10px;
}

.ok-meta-cat{
  background:#e10000;
  color:#fff;
  padding:4px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}

.ok-read{
  font-size:14px;
  display:inline-block;
  color:#e10000;
  font-weight:600;
}


/* =================================================
HORIZONTAL SCROLL
================================================= */
.ok-scroll{
  display:flex;
  gap:16px;
  overflow-x:auto;
  padding-bottom:6px;
}

.ok-scroll::-webkit-scrollbar{display:none;}

.ok-scroll-card{
  min-width:230px;
  background:#000;
  border-radius:18px;
  overflow:hidden;
  position:relative;
}

.ok-scroll-card img{height:280px;object-fit:cover;}

.ok-scroll-card h4{
  position:absolute;
  bottom:0;
  padding:12px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  background:linear-gradient(to top,rgba(0,0,0,.85),transparent);
  width:100%;
}


/* =================================================
NORMAL GRID
================================================= */
.ok-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}

.ok-card{
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}

.ok-card img{height:150px;object-fit:cover;}
.ok-card h4{padding:10px;font-size:15px;font-weight:700;}


/* =================================================
LIST STYLE
================================================= */
.ok-list{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.ok-list-item{
  background:#020617;
  border-radius:14px;
  padding:8px;
}

.ok-list-item a{
  display:flex;
  gap:12px;
  align-items:center;
}

.ok-list-item img{
  width:140px;
  height:90px;
  object-fit:cover;
  border-radius:10px;
}

.ok-list-item h4{
  font-size:14px;
  font-weight:600;
  line-height:1.3;
  margin:0;
  color:#e5e7eb;
  transition:.25s;
}

.ok-list-item a:hover h4{
  color:#e10000;
}


/* =================================================
RESPONSIVE BASE
================================================= */
@media(min-width:600px){
  .ok-latest-grid{grid-template-columns:1fr 1fr;}
  .ok-grid{grid-template-columns:repeat(3,1fr);}
}

@media(min-width:900px){
  .ok-home{max-width:1160px;}
  .ok-grid{grid-template-columns:repeat(4,1fr);}
}

@media(min-width:1200px){
  .ok-home{max-width:1180px;}
}


/* =================================================
HOME MAGAZINE DESKTOP SYSTEM (FINAL & CLEAN)
================================================= */

@media(min-width:900px){

  /* MAIN STRUCTURE */
  .ok-home .ok-latest-grid{
    display:grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas:
      "featured side"
      "posts posts";
    gap:24px;
    align-items:start;
  }

  /* BIG FEATURED */
  .ok-home .ok-latest-card:first-child{
    grid-area:featured;
  }

  .ok-home .ok-latest-card:first-child img{
    height:380px;
  }

  .ok-home .ok-latest-card:first-child .ok-featured-title{
    font-size:24px;
  }

  /* RIGHT SIDE CARD */
  .ok-home .ok-latest-card:nth-child(2){
    grid-area:side;
  }

  .ok-home .ok-latest-card:nth-child(2) img{
    height:380px;
  }

  /* POSTS WRAPPER */
  .ok-home .ok-latest-card:nth-child(n+3){
    grid-area:posts;
  }

  /* 2x2 GRID FOR REST */
  .ok-home .ok-latest-grid{
    grid-auto-flow:row;
  }

  .ok-home .ok-latest-grid{
    --post-gap:22px;
  }

  .ok-home .ok-latest-grid > .ok-latest-card:nth-child(n+3){
    margin-top:0;
  }

  .ok-home .ok-latest-grid{
    row-gap:24px;
  }

  .ok-home .ok-latest-grid{
    display:grid;
  }

  .ok-home .ok-latest-grid{
    grid-auto-rows:auto;
  }

  .ok-home .ok-latest-grid .ok-latest-card:nth-child(n+3){
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:22px;
  }

  .ok-home .ok-latest-grid .ok-latest-card:nth-child(n+3) img{
    height:190px;
  }

}


/* =================================================
ULTRA DESKTOP POLISH
================================================= */

@media(min-width:1200px){

  .ok-home .ok-latest-grid{
    gap:28px;
  }

  .ok-home .ok-latest-card:first-child img{
    height:420px;
  }

  .ok-home .ok-latest-card:nth-child(2) img{
    height:420px;
  }

  .ok-home .ok-latest-grid .ok-latest-card:nth-child(n+3) img{
    height:210px;
  }

}
