/* ===============================
   GENEL
================================ */
.section{
    max-width:1200px;
    
    padding:10px;
}

a {
    text-decoration: none;
}

.section h2{
    margin-bottom:15px;
    font-size:20px;
    color:var(--text);
}

/* ===============================
   🔥 POPÜLER
================================ */
.popular-row{
    display:flex;
    gap:20px;
    justify-content:center;
    align-items:stretch;
    flex-wrap:wrap;
}

.popular-card{
    width:180px;
    background:var(--card);
    border-radius:14px;
    text-decoration:none;
    color:var(--text);
    position:relative;
    border:1px solid var(--border);
    transition:.25s;
}

.popular-card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 25px rgba(0,0,0,.25);
}

.popular-card img{
    width:100%;
    height:230px;
    object-fit:cover;
    border-radius:14px 14px 0 0;
}

.popular-card .title,
.popular-card span{
    display:block;
    padding:10px;
    font-size:14px;
    font-weight:500;
}

/* TREND */
.trend,
.trend-badge{
    position:absolute;
    top:8px;
    left:8px;
    background:linear-gradient(135deg,#facc15,#f97316);
    color:#000;
    font-size:11px;
    font-weight:700;
    padding:4px 8px;
    border-radius:8px;
    z-index:2;
}

/* ===============================
   🔍 ARAMA
================================ */
.search-input{
    width:92%;
    padding:14px;
    border-radius:14px;
    border:1px solid var(--border);
    background:var(--card);
    color:var(--text);
    font-size:15px;
}

.search-input::placeholder{
    color:var(--muted);
}

/* ===============================
   📚 GRID
================================ */
.grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
    gap:20px;
}

.card{
    background:var(--card);
    border-radius:14px;
    overflow:hidden;
    text-decoration:none;
    color:var(--text);
    border:1px solid var(--border);
    transition:.25s;
}

.card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 25px rgba(0,0,0,.25);
}

.card img{
    
    
    width:166px;
 
    object-fit:cover;
}

.card span{
    display:block;
    padding:10px;
    font-size:14px;
}

/* ===============================
   📄 SAYFALAMA
================================ */
.pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin:50px 0;
    flex-wrap:wrap;
}

.page-btn{
    min-width:38px;
    height:38px;
    padding:0 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--card);
    color:var(--text);
    border-radius:12px;
    font-size:14px;
    font-weight:600;
    text-decoration:none;
    border:1px solid var(--border);
    transition:.25s;
}

.page-btn:hover{
    background:var(--primary);
    color:#fff;
    transform:translateY(-2px);
}

.page-btn.active{
    background:linear-gradient(135deg,#facc15,#f97316);
    color:#000;
    box-shadow:0 6px 15px rgba(250,204,21,.35);
}

.page-btn.prev,
.page-btn.next{
    font-size:18px;
    padding:0 16px;
}

.dots{
    padding:0 6px;
    color:var(--muted);
    font-size:18px;
}

/* ===============================
   MOBİL
================================ */
@media(max-width:768px){
    .popular-row{
        justify-content:flex-start;
        flex-wrap:nowrap;
        overflow-x:auto;
        padding-bottom:10px;
    }

    .popular-row::-webkit-scrollbar{
        display:none;
    }

    .popular-card img{height:180px}
    .card img{height:200px}
}

@media(max-width:768px){
    /* Popüler kartlar mobilde yan yana 2 adet olacak */
    .popular-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap:10px;
        overflow-x: visible; /* kaydırmayı kaldır */
        padding-bottom:0;
        justify-items: center;
    }

    .popular-card img {
        height:180px; /* mevcut yükseklik */
    }

    .card img {
        height:200px;
    }
}

/* ===============================
   MOBİL
================================ */
@media(max-width:768px){

    /* Popüler videolar: 2 sütun, kartlar ortalanmış */
    .popular-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 sütun */
        gap:10px; /* kartlar arası boşluk */
        padding-bottom:0;
        justify-items: center;
        overflow-x: visible; /* kaydırmayı kaldır */
    }

    .popular-card {
        width:100%; /* grid hücresine otur */
    }

    .popular-card img {
        height:180px;
        width:100%;
    }

    /* Tüm diziler: 2 sütun mobilde */
    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 sütun */
        gap:15px;
    }

    .card {
        width:100%; /* grid hücresine otur */
    }

    .card img {
        height:200px;
        width:100%;
    }
}


/* 🖥 PC */
.search-form {
    display: flex;
    gap: 0;
    max-width: 700px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    border-radius: 8px 0 0 8px;
}

.search-btn {
    border-radius: 0 8px 8px 0;
    white-space: nowrap;
    height: 47px;
    margin-top: 8px;
}

/* 📱 MOBİL */
@media (max-width: 576px) {
    .search-form {
        flex-direction: column;
        max-width: 100%;
    }

    .search-input {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .search-btn {
        width: 100%;
        border-radius: 8px;
    }
}
