/* ================================================
   Ha Blog Widget — HanTema v1.0.0
   Prefix: hablog-  (çakışma önlemi)
   ================================================ */

.hablog-wrap {
    --hablog-bg:         #F5F0E8;
    --hablog-card-bg:    #ffffff;
    --hablog-img-bg:     #EDE8DF;
    --hablog-text:       #1A1A1A;
    --hablog-sub:        #5C574F;
    --hablog-muted:      #7B7670;
    --hablog-border:     #E8E2D8;
    --hablog-accent:     #C8A96E;
    --hablog-accent-lt:  #E8D9B8;
    --hablog-dark:       #1A1A1A;
    --hablog-cat-bg:     rgba(200,169,110,.12);
    --hablog-cat-color:  #8C6D3A;
    --hablog-radius:     18px;
    --hablog-radius-img: 18px;
    --hablog-gap:        24px;
    box-sizing: border-box;
    font-family: inherit;
}
.hablog-wrap *, .hablog-wrap *::before, .hablog-wrap *::after {
    box-sizing: inherit;
}

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
.hablog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 36px;
    gap: 16px;
    flex-wrap: wrap;
}
.hablog-header-left { flex: 1; min-width: 0; }

.hablog-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.hablog-eyebrow-line {
    width: 28px;
    height: 2px;
    background: var(--hablog-accent);
    border-radius: 2px;
    flex-shrink: 0;
}
.hablog-eyebrow-text {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hablog-accent);
}

.hablog-title {
    font-size: 36px;
    font-weight: 900;
    color: var(--hablog-text);
    line-height: 1.2;
    margin: 0;
    word-break: break-word;
}

/* NAV — sadece carousel modunda görünür */
.hablog-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    align-self: center;
}
.hablog-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--hablog-border);
    background: var(--hablog-card-bg);
    color: var(--hablog-text);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .22s;
    flex-shrink: 0;
    line-height: 1;
}
.hablog-nav-btn:hover {
    background: var(--hablog-dark);
    border-color: var(--hablog-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,26,26,0.15);
}
.hablog-nav-btn:disabled {
    opacity: .32;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ══════════════════════════════
   CAROUSEL MODE
══════════════════════════════ */
.hablog-slider-outer {
    overflow: hidden;
    cursor: grab;
    user-select: none;
}
.hablog-slider-outer:active { cursor: grabbing; }

.hablog-slider-track {
    display: flex;
    gap: var(--hablog-gap);
    transition: transform .45s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    align-items: stretch;
}

/* ══════════════════════════════
   GRID MODE
══════════════════════════════ */
.hablog-grid {
    display: grid;
    gap: var(--hablog-gap);
}

/* ══════════════════════════════
   KART — paylaşılan stiller
══════════════════════════════ */
.hablog-card {
    background: var(--hablog-card-bg);
    border-radius: var(--hablog-radius);
    overflow: hidden;
    border: 1px solid var(--hablog-border);
    display: flex;
    flex-direction: column;
    transition: transform .28s ease, box-shadow .28s ease;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0; /* carousel için */
}
.hablog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.10);
    text-decoration: none;
    color: inherit;
}

/* ── GÖRSEL ── */
.hablog-card-img-wrap {
    position: relative;
    background: var(--hablog-img-bg);
    overflow: hidden;
    flex-shrink: 0;
    line-height: 0;
}
.hablog-card-img-wrap img {
    width: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.hablog-card:hover .hablog-card-img-wrap img {
    transform: scale(1.06);
}

/* KATEGORİ ROZET */
.hablog-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--hablog-cat-bg);
    color: var(--hablog-cat-color);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(200,169,110,.25);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 1;
    line-height: 1.4;
}

/* OK BUTONU */
.hablog-arrow-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hablog-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--hablog-dark);
    z-index: 1;
    transition: background .22s, transform .22s;
    flex-shrink: 0;
}
.hablog-card:hover .hablog-arrow-btn {
    background: var(--hablog-dark);
    color: #fff;
    transform: rotate(45deg);
}
.hablog-arrow-btn i {
    font-size: 13px !important;
    line-height: 1 !important;
    display: block !important;
}

/* ── BODY ── */
.hablog-card-body {
    padding: 20px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* META */
.hablog-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--hablog-muted);
    margin-bottom: 10px;
    flex-wrap: wrap;
    row-gap: 4px;
}
.hablog-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.hablog-meta-item i {
    font-size: 11px !important;
    opacity: .65;
    flex-shrink: 0;
    display: block !important;
    line-height: 1 !important;
}

/* BAŞLIK */
.hablog-card-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--hablog-text);
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hablog-card:hover .hablog-card-title {
    color: var(--hablog-accent);
}

/* ÖZET */
.hablog-card-excerpt {
    font-size: 14px;
    color: var(--hablog-muted);
    line-height: 1.68;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* DEVAMINI OKU */
.hablog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hablog-accent);
    text-decoration: none;
    margin-top: 16px;
    transition: gap .2s, color .2s;
    width: fit-content;
}
.hablog-read-more:hover { gap: 10px; color: var(--hablog-dark); }
.hablog-read-more i {
    font-size: 11px !important;
    display: block !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

/* ══════════════════════════════
   DOTS
══════════════════════════════ */
.hablog-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.hablog-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hablog-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, width .25s, border-radius .25s;
    flex-shrink: 0;
}
.hablog-dot.is-active {
    background: var(--hablog-accent);
    width: 26px;
    border-radius: 4px;
}

/* ══════════════════════════════
   GRID — BÜYÜK FEATURED KART
   (grid modunda ilk kart büyük)
══════════════════════════════ */
.hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child {
    grid-column: 1 / -1; /* Tüm genişlik */
    flex-direction: row;
}
.hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child .hablog-card-img-wrap {
    width: 50%;
    flex-shrink: 0;
}
.hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child .hablog-card-img-wrap img {
    height: 100% !important;
    min-height: 280px;
}
.hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child .hablog-card-body {
    padding: 32px 32px 28px;
    justify-content: center;
}
.hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child .hablog-card-title {
    font-size: 22px;
    -webkit-line-clamp: 3;
}
.hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child .hablog-card-excerpt {
    -webkit-line-clamp: 4;
}

/* ══════════════════════════════
   TABLET ≤1024px
══════════════════════════════ */
@media (max-width: 1024px) {
    .hablog-title { font-size: 28px !important; }
    .hablog-card-body { padding: 16px 16px 18px; }
    .hablog-card-title { font-size: 15px !important; }
}

/* ══════════════════════════════
   MOBİL ≤767px
══════════════════════════════ */
@media (max-width: 767px) {
    .hablog-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
    .hablog-title  { font-size: 22px !important; }
    .hablog-nav-btn { width: 42px; height: 42px; font-size: 13px; }
    .hablog-dots   { margin-top: 20px; }
    .hablog-grid   { grid-template-columns: 1fr !important; }

    /* Featured kart mobilde dikey */
    .hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child {
        flex-direction: column;
    }
    .hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child .hablog-card-img-wrap {
        width: 100%;
    }
    .hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child .hablog-card-body {
        padding: 18px 18px 20px;
    }
    .hablog-wrap.hablog-mode-grid .hablog-grid.hablog-has-featured .hablog-card:first-child .hablog-card-title {
        font-size: 17px !important;
    }
}

/* ══════════════════════════════
   KÜÇÜK MOBİL ≤480px
══════════════════════════════ */
@media (max-width: 480px) {
    .hablog-title        { font-size: 19px !important; }
    .hablog-card-title   { font-size: 14px !important; }
    .hablog-card-excerpt { font-size: 13px !important; }
}
