/* ============================================================
   Apple News Hub – Sidebar CSS (clean, standalone)
   ============================================================ */

/* ---- Base widget kapsayıcı ---- */
.anh-widget {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, rgba(0,0,0,0.1));
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}

/* Widget başlığı - küçük uppercase etiket */
.anh-widget__label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-text-tertiary, #aeaeb2);
    padding: 10px 14px 9px;
    background: var(--color-bg-secondary, #f5f5f7);
    border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.1));
}

/* Genel body padding */
.anh-widget__body {
    padding: 12px 14px;
}

/* ============================================================
   ARAMA KUTUSU
   ============================================================ */
.anh-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg-secondary, #f5f5f7);
    border: 1.5px solid var(--color-border, rgba(0,0,0,0.1));
    border-radius: 10px;
    padding: 7px 7px 7px 11px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.anh-search-box:focus-within {
    border-color: var(--color-accent, #0071e3);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
    background: var(--color-surface, #fff);
}

.anh-search-box > svg {
    color: var(--color-text-tertiary, #aeaeb2);
    flex-shrink: 0;
}

.anh-search-box input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    font-size: 13.5px;
    color: var(--color-text-primary, #1d1d1f);
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
}

.anh-search-box input[type="search"]::placeholder {
    color: var(--color-text-tertiary, #aeaeb2);
}

.anh-search-box button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: var(--color-accent, #0071e3);
    border: none;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.anh-search-box button[type="submit"]:hover {
    background: #0077ed;
    transform: scale(1.06);
}

/* ============================================================
   BÜLTEN (mavi gradient)
   ============================================================ */
.anh-widget--newsletter {
    background: linear-gradient(150deg, #0071e3 0%, #0051a2 100%) !important;
    border-color: transparent !important;
}

.anh-widget__header {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 14px 14px 11px;
    border-bottom: 1px solid rgba(255,255,255,0.13);
}

.anh-widget__icon { font-size: 22px; flex-shrink: 0; }

.anh-widget__title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 3px;
    line-height: 1.3;
}

.anh-widget__subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.68);
    margin: 0;
    line-height: 1.5;
}

.anh-newsletter {
    padding: 11px 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.anh-newsletter__input {
    width: 100%;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.13);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: all 0.15s;
}

.anh-newsletter__input::placeholder { color: rgba(255,255,255,0.45); }

.anh-newsletter__input:focus {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.45);
}

.anh-newsletter__btn {
    width: 100%;
    padding: 9px 11px;
    border-radius: 8px;
    border: none;
    background: #fff;
    color: #004aad;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.15s;
}

.anh-newsletter__btn:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0,0,0,0.22);
}

/* ============================================================
   POPÜLER YAZILAR — 6 kart
   ============================================================ */
.anh-popular-grid {
    display: flex;
    flex-direction: column;
}

.anh-popular-card {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 11px 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.1));
    transition: background 0.13s;
}

.anh-popular-card:last-child { border-bottom: none; }

.anh-popular-card:hover {
    background: var(--color-bg-secondary, #f5f5f7);
}

.anh-popular-card__img {
    width: 68px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg-tertiary, #e8e8ed);
}

.anh-popular-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.anh-popular-card:hover .anh-popular-card__img img {
    transform: scale(1.06);
}

.anh-popular-card__noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary, #aeaeb2);
}

.anh-popular-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.anh-popular-card__cat {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent, #0071e3);
}

.anh-popular-card__title {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-primary, #1d1d1f);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.13s;
}

.anh-popular-card:hover .anh-popular-card__title {
    color: var(--color-accent, #0071e3);
}

.anh-popular-card__meta {
    font-size: 10.5px;
    color: var(--color-text-tertiary, #aeaeb2);
}

/* ============================================================
   SON YAZILAR — liste
   ============================================================ */
.anh-recent-list {
    display: flex;
    flex-direction: column;
}

.anh-recent-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 9px 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.1));
    transition: background 0.13s;
}

.anh-recent-item:last-child { border-bottom: none; }

.anh-recent-item:hover {
    background: var(--color-bg-secondary, #f5f5f7);
}

.anh-recent-item__thumb {
    width: 46px;
    height: 46px;
    border-radius: 7px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg-tertiary, #e8e8ed);
}

.anh-recent-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.anh-recent-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.anh-recent-item__cat {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-accent, #0071e3);
}

.anh-recent-item__title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.38;
    color: var(--color-text-primary, #1d1d1f);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.13s;
}

.anh-recent-item:hover .anh-recent-item__title {
    color: var(--color-accent, #0071e3);
}

.anh-recent-item__time {
    font-size: 10.5px;
    color: var(--color-text-tertiary, #aeaeb2);
}

/* ============================================================
   KATEGORİLER
   ============================================================ */
.anh-cats {
    display: flex;
    flex-direction: column;
}

.anh-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary, #6e6e73);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.1));
    transition: background 0.13s, color 0.13s, padding-left 0.13s;
}

.anh-cat-item:last-child { border-bottom: none; }

.anh-cat-item:hover,
.anh-cat-item.is-active {
    color: var(--color-accent, #0071e3);
    background: rgba(0,113,227,0.06);
    padding-left: 18px;
}

.anh-cat-item__count {
    font-size: 10.5px;
    font-weight: 600;
    background: var(--color-bg-tertiary, #e8e8ed);
    color: var(--color-text-tertiary, #aeaeb2);
    border-radius: 20px;
    padding: 2px 7px;
    flex-shrink: 0;
    transition: all 0.13s;
}

.anh-cat-item:hover .anh-cat-item__count,
.anh-cat-item.is-active .anh-cat-item__count {
    background: rgba(0,113,227,0.1);
    color: var(--color-accent, #0071e3);
}

/* ============================================================
   ETİKETLER
   ============================================================ */
.anh-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.anh-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--color-text-secondary, #6e6e73);
    background: var(--color-bg-secondary, #f5f5f7);
    border: 1px solid var(--color-border, rgba(0,0,0,0.1));
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.13s;
    line-height: 1;
}

.anh-tag:hover {
    color: var(--color-accent, #0071e3);
    border-color: var(--color-accent, #0071e3);
    background: rgba(0,113,227,0.07);
}

/* ============================================================
   YAZAR BİO (single post)
   ============================================================ */
.author-bio {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    background: var(--color-bg-secondary, #f5f5f7);
    border: 1px solid var(--color-border, rgba(0,0,0,0.1));
    border-radius: 14px;
    margin-top: 36px;
}

.author-bio__avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--color-border, rgba(0,0,0,0.1));
}

.author-bio__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-bio__content { flex: 1; min-width: 0; }

.author-bio__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary, #1d1d1f);
    margin: 0 0 2px;
}

.author-bio__role {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-accent, #0071e3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
}

.author-bio__text {
    font-size: 13.5px;
    color: var(--color-text-secondary, #6e6e73);
    line-height: 1.6;
    margin: 0;
}

.author-bio__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-accent, #0071e3);
    font-weight: 600;
    margin-top: 10px;
    text-decoration: none;
    transition: gap 0.15s;
}

.author-bio__link:hover { gap: 8px; }

@media (max-width: 480px) {
    .author-bio { flex-direction: column; align-items: center; text-align: center; }
    .author-bio__link { justify-content: center; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .anh-popular-grid {
        grid-template-columns: 1fr;
    }
    .anh-popular-card:nth-child(odd) { border-right: none; }
}

/* ============================================================
   RANKED LIST (Popüler & Son Yazılar - Modern)
   ============================================================ */
.anh-ranked-list {
    display: flex;
    flex-direction: column;
}

.anh-ranked-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.07));
    transition: background 0.15s;
    position: relative;
}

.anh-ranked-item:last-child { border-bottom: none; }

.anh-ranked-item:hover {
    background: var(--color-bg-secondary, #f5f5f7);
}

/* Numara rozeti */
.anh-ranked-item__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
    background: var(--color-accent, #0071e3);
    color: #fff;
    flex-shrink: 0;
    line-height: 1;
}

.anh-ranked-item:nth-child(1) .anh-ranked-item__num { background: #0071e3; }
.anh-ranked-item:nth-child(2) .anh-ranked-item__num { background: #34aadc; }
.anh-ranked-item:nth-child(3) .anh-ranked-item__num { background: #5ac8fa; }
.anh-ranked-item:nth-child(4) .anh-ranked-item__num { background: #aeaeb2; }
.anh-ranked-item:nth-child(5) .anh-ranked-item__num { background: #c7c7cc; }

/* Küçük kare görsel */
.anh-ranked-item__img {
    width: 58px;
    height: 48px;
    min-width: 58px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-tertiary, #e8e8ed);
    flex-shrink: 0;
}

.anh-ranked-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.anh-ranked-item:hover .anh-ranked-item__img img {
    transform: scale(1.06);
}

.anh-ranked-item__noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary, #aeaeb2);
}

/* İçerik */
.anh-ranked-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.anh-ranked-item__cat {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-accent, #0071e3);
    line-height: 1;
}

.anh-ranked-item__title {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.38;
    color: var(--color-text-primary, #1d1d1f);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.13s;
}

.anh-ranked-item:hover .anh-ranked-item__title {
    color: var(--color-accent, #0071e3);
}

.anh-ranked-item__meta {
    font-size: 10px;
    color: var(--color-text-tertiary, #aeaeb2);
    margin-top: 1px;
}

/* Son yazılarda numara yok */
.anh-ranked-item--recent .anh-ranked-item__num {
    display: none;
}
