/* Masonry using CSS columns for explore-like layout */
.masonry {
  column-count: 5;       /* number of vertical columns */
  column-gap: 30px;      /* space between columns */
  width: 100%;
}

.masonry .card {
  display: inline-block; /* important: makes them respect columns */
  width: 100%;           
  margin-bottom: 30px;
  break-inside: avoid;   /* prevents card splitting */
}
@media (max-width:1100px) {
  .masonry { column-count: 3; }
}
@media (max-width:800px) {
  .masonry { column-count: 2; }
}


/* Cards inside columns must be inline-block to participate */
.card {
    display: inline-block;
    width: 100%;
    margin: 0 0 20px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    box-shadow: rgb(255 255 255 / 16%) 0px 1px 4px;
    transform-origin: center;
    transition: transform 250ms cubic-bezier(.2,.9,.3,1), box-shadow 200ms;
}

.card:focus-within, .card:hover{ 
    transform: translateY(-8px); 
    box-shadow: 0 18px 40px rgba(2,6,23,0.75); 
}

/* thumbnail area */
.media {
    position: relative;
    display:block;
    width:100%;
    overflow:hidden;
    background: #071022;
}

/* control aspect ratios using aspect-ratio when supported */
.media img{
    display:block;
    width:100%;
    height:100%;
    object-fit: cover;
    transition: transform 420ms cubic-bezier(.2,.9,.3,1);
    -webkit-user-drag: none;
    -webkit-user-select:none;
    user-select:none;
}

/* overlay appear on hover */
.media-overlay {
    position:absolute; 
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.6));
    opacity:0; transition: opacity 220ms ease;
}
.card:hover .media-overlay, .card:focus-within .media-overlay { 
    opacity:1; 
}

.gt-news-image:hover .media-overlay, .gt-news-image:focus-within .media-overlay { 
    opacity:1; 
}

/* Play button */
.play {
    width:64px; 
    height:64px;
    border-radius: 50%;
    background: rgb(9 12 19);
    display:flex; 
    align-items:center; 
    justify-content:center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    cursor:pointer; 
    transform:scale(1); 
    transition: transform 160ms ease;
}
.play:hover{ 
    transform: scale(1.08); 
}

.play img{
    width: 30px !important;
    height: 30px !important;
    object-fit: contain;
}

.meta {
    padding: 10px 12px;
    background-color: var(--gt-theme);
}

.meta h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #f6fbff;
    line-height: 1.3;
    display: flex;            /* keeps link + plays inline */
    align-items: center;      /* vertical center */
    gap: 6px;                 /* space before/after the dot */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta h3 a {
    color: #f6fbff;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta .plays {
    font-size: 12px;
    color: var(--gt-text);
    font-weight: 400;
}

/* Play preview micro animation */
.card:hover img{ 
    transform: scale(1.07) rotate(.2deg); 
    filter: saturate(1.05) contrast(1.02); 
}

/* Aspect helpers using aspect-ratio if supported, fallback via padding hack */
.ratio-9x16{ 
    aspect-ratio: 9 / 16; 
    width:100%; 
    height:auto; 
}
.ratio-16x9{ 
    aspect-ratio: 16 / 9; 
    width:100%; 
    height:auto; 
}
.ratio-square{ 
    aspect-ratio: 1 / 1; 
    width:100%; 
    height:auto; 
}

/* small responsive tweaks */
@media (max-width:520px){
    .play{ width:50px; height:50px; }
}

.ad-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin:0 0 30px; 
    text-align:center;
}

.ad-container ins {
    display: block !important;
    margin: auto;
    max-width: 100%;
}
.ad-title{
    font-size:13px;
    color: #ffffff;
    background-color: #ec0707;
}

.category-box {
    display: flex; 
    align-items: center;
    grid-column-start: span 2;
    grid-row-start: span 1;
    overflow: hidden;
    background-color: var(--gt-white);
    border-radius: var(--gt-border-radius);
    box-shadow: rgb(255 255 255 / 16%) 0px 1px 4px;
}

.category-box .category-img {
    transition: transform 0.3s ease;
     border-radius: 16px 0 0 16px;
}

.category-box:hover .category-img {
    transform: scale(1.15); /* zoom effect */
}

.category-text {
    color: var(--gt-theme);
    font-weight: 700;
    font-size: 12px;
    line-height: 20px;
    padding: 0 8px;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.category-box:nth-child(1) { background: #FFEBEE; }   /* pastel pink */
.category-box:nth-child(2) { background: #E3F2FD; }   /* pastel blue */
.category-box:nth-child(3) { background: #E8F5E9; }   /* pastel green */
.category-box:nth-child(4) { background: #FFFDE7; }   /* pastel yellow */
.category-box:nth-child(5) { background: #F3E5F5; }   /* pastel purple */
.category-box:nth-child(6) { background: #FFF3E0; }   /* pastel orange */
.category-box:nth-child(7) { background: #E0F7FA; }   /* pastel cyan */
.category-box:nth-child(8) { background: #FBE9E7; }   /* pastel peach */
.category-box:nth-child(9) { background: #F1F8E9; }   /* pastel lime */
.category-box:nth-child(10){ background: #EDE7F6; }   /* pastel lavender */
.category-box:nth-child(11){ background: #F9FBE7; }   /* pastel light yellow */
.category-box:nth-child(12){ background: #E0F2F1; }   /* pastel teal */
.category-box:nth-child(13){ background: #FFF8E1; }   /* pastel cream */
.category-box:nth-child(14){ background: #FCE4EC; }   /* pastel rose */
.category-box:nth-child(15){ background: #ECEFF1; }   /* pastel grey */

.no-more {
  color: #ccc;
  font-size: 15px;
  text-align: center;
  margin: 20px 0;
  font-style: italic;
}