/*
Theme Name:   Mies Child - Kendirciler İnşaat
Template:     mies
Version:      2.0.6
Text Domain:  mies-child
Description:  Kendirciler İnşaat için Mies child teması. Sektöre özel Schema.org yapılandırması, SEO geliştirmeleri ve çok dil (Polylang) desteği içerir.
*/

/* Yabancı dil alanlarında sabit WhatsApp / Telegram butonları (inc/contact-buttons.php) */
.kendi-chat {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}
.kendi-chat__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 12px;
    border-radius: 999px;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: transform .15s ease;
}
.kendi-chat__btn:hover { transform: translateY(-2px); }
.kendi-chat__btn svg { width: 24px; height: 24px; flex: none; }
.kendi-chat__btn--wa { background: #25d366; }
.kendi-chat__btn--tg { background: #229ed9; }

@media (max-width: 600px) {
    .kendi-chat { right: 14px; bottom: 16px; }
    .kendi-chat__btn { padding: 12px; }
    .kendi-chat__btn span { display: none; }
}

/* Açılır dil seçimi: "RU ▾" — "Menu" düğmesinin solunda (inc/i18n.php) */
.kendi-lang {
    position: fixed;
    top: 1.17647rem;
    right: 8rem;
    z-index: 210;
    font-family: Lato, sans-serif;
    font-size: 12px;
    letter-spacing: 1.2px;
    line-height: 18px;
    text-transform: uppercase;
    white-space: nowrap;
}
.kendi-lang.is-in-nav { position: absolute; top: 0; right: 130px; }
.kendi-lang__toggle {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    line-height: inherit;
    cursor: pointer;
}
.kendi-lang__caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform .2s ease;
}
.kendi-lang.is-open .kendi-lang__caret { transform: rotate(180deg); }
.kendi-lang__list {
    position: absolute;
    top: 28px;
    right: -12px;
    min-width: 150px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    text-transform: none;
    letter-spacing: normal;
    font-size: 14px;
}
.kendi-lang__list[hidden] { display: none; }
.kendi-lang__list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #171617 !important;
    text-decoration: none !important;
}
.kendi-lang__list a:hover, .kendi-lang__list a:focus { background: #f2f2f2; }
.kendi-lang__code { font-size: 11px; font-weight: 700; letter-spacing: 1px; opacity: .55; min-width: 20px; }

/*
 * Safari beyaz sayfa düzeltmesi.
 * Mies teması Safari'de <html>'i görünmez yapıp (opacity: 0) sayfa "load" olayında tekrar gösteriyor.
 * LiteSpeed betikleri ertelediği için Safari'de bu olay bazen kaçıyor ve sayfa beyaz kalıyor.
 * Stil dosyasındaki !important, temanın betikle verdiği satır içi değeri geçersiz kılar.
 */
html { opacity: 1 !important; }

/* Makalelerdeki karşılaştırma tablosu (ör. «Лиман или Хурма») */
.kendi-compare { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.kendi-compare th, .kendi-compare td { padding: 10px 12px; border-bottom: 1px solid #e5e5e5; text-align: left; vertical-align: top; }
.kendi-compare thead th { border-bottom: 2px solid #171617; font-weight: 700; }
.kendi-compare td:first-child { font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) {
    .kendi-compare { font-size: 13px; }
    .kendi-compare td:first-child { white-space: normal; }
}

/* Son yazılar kartları — [kendi_son_yazilar] (inc/latest-posts.php) */
.kendi-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
    margin: 1.5em 0 2em;
}
.kendi-post { display: flex; flex-direction: column; background: #fff; }
.kendi-post__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #ece9e4; }
.kendi-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.kendi-post:hover .kendi-post__img img { transform: scale(1.04); }
.kendi-post__noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e9e4dc, #cfd8dc); }
.kendi-post__body { padding: 14px 2px 0; display: flex; flex-direction: column; flex: 1; }
.kendi-post__date { font-size: 12px; letter-spacing: 1px; opacity: .55; }
.kendi-post__title { font-size: 18px; line-height: 1.35; margin: 6px 0 8px; }
.kendi-post__title a { color: inherit; text-decoration: none; }
.kendi-post__excerpt { font-size: 14px; line-height: 1.6; opacity: .8; margin: 0 0 10px; flex: 1; }
.kendi-post__more { font-size: 13px; font-weight: 600; letter-spacing: .5px; text-decoration: none; }
.kendi-posts__all { margin-bottom: 2em; }
