/*
Theme Name:   PopularFX Ekosos Child
Theme URI:    https://ekosos.org.tr/
Description:  Ekoloji ve Sosyal Gelisim Dernegi icin child theme - iyilestirme paketi
Author:       Ekosos
Author URI:   https://ekosos.org.tr/
Template:     popularfx
Version:      1.3.9
Text Domain:  popularfx-ekosos-child
*/

/* CSS degiskenleri - Modul 5'te tam degerlerle doldurulacak */
:root {
    --ekosos-primary:        #7ccd57;
    --ekosos-primary-dark:   #5fa83f;
    --ekosos-surface:        #ffffff;
    --ekosos-ink:            #0e1b01;
}

/* --- Sosyal medya butonlari (shortcode + footer bandi) --- */

.ekosos-social-buttons {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ekosos-social-buttons__label {
    color: inherit;
    font-size: 0.95rem;
    margin-right: 4px;
}

.ekosos-social-buttons__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ekosos-primary, #7ccd57);
    color: var(--ekosos-surface, #ffffff);
    text-decoration: none;
    line-height: 1;
    transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.ekosos-social-buttons__link:hover,
.ekosos-social-buttons__link:focus-visible {
    background: var(--ekosos-primary-dark, #5fa83f);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color: var(--ekosos-surface, #ffffff);
}

.ekosos-social-buttons__link svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* --- Footer altina yapisik sosyal bant --- */

.ekosos-footer-social-bar {
    background: #0e1b01;
    color: #f6f6f6;
    padding: 18px 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.ekosos-footer-social-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ekosos-footer-social-bar__label {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

/* Mobilde dikey duzene gec */
@media (max-width: 480px) {
    .ekosos-footer-social-bar__inner {
        flex-direction: column;
        gap: 10px;
    }
}


/* --- Yazi alti profesyonel yazar karti (FULL-WIDTH YATAY) ---
   Yazı içeriğinin hemen altında, full genişlikte, yatay düzen.
   Avatar sol, bilgiler sağ. Sidebar'a düşmez (the_content priority 1000). */

/* Defensive: PopularFX aside icin sidebar stili koysa da etkilenmesin (zaten div'e gectik). */
.ekosos-author-box,
div.ekosos-author-box,
aside.ekosos-author-box {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #f7faf3 0%, #ffffff 100%);
    border-left: 4px solid var(--ekosos-primary, #7ccd57);
    border-top: 1px solid #e8efe0;
    border-right: 1px solid #e8efe0;
    border-bottom: 1px solid #e8efe0;
    padding: 22px 26px;
    margin: 40px 0 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(124, 205, 87, 0.06);
    width: auto !important;
    max-width: none !important;
    position: static !important;
    float: none !important;
    clear: both;
}

/* Avatar yuvarlak, profesyonel */
.ekosos-author-box__avatar {
    flex: 0 0 auto;
}
.ekosos-author-box__avatar img,
.ekosos-author-box__img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--ekosos-primary, #7ccd57);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ekosos-author-box__bio {
    display: none !important;
}

.ekosos-author-box__body {
    flex: 1 1 auto;
    min-width: 0;
}

/* 1. Satir: YAZAR caps label */
.ekosos-author-box__label {
    display: block;
    font-size: 0.72rem;
    color: var(--ekosos-primary-dark, #5fa83f);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin: 0 0 4px;
}

/* 2. Satir: İsim - profesyonel punto, tek satır rahatca sigar (full-width) */
.ekosos-author-box__name {
    display: block;
    margin: 0 0 8px;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--ekosos-ink, #0e1b01);
    font-weight: 700;
}
.ekosos-author-box__name strong {
    font-weight: 700;
}

/* 3. Satir: Diger yazilari linki */
.ekosos-author-box__link {
    margin: 0;
}
.ekosos-author-box__link a {
    color: var(--ekosos-primary-dark, #5fa83f);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 150ms ease;
}
.ekosos-author-box__link a:hover,
.ekosos-author-box__link a:focus-visible {
    color: var(--ekosos-primary, #7ccd57);
    text-decoration: underline;
}

/* Mobilde dikey duzen */
@media (max-width: 600px) {
    .ekosos-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .ekosos-author-box__avatar img,
    .ekosos-author-box__img {
        width: 80px;
        height: 80px;
    }
}


/* --- Görsel pattern'leri (Modül 3) --- */

/* Geniş görsel */
.ekosos-genis-gorsel figcaption,
.ekosos-genis-gorsel .wp-element-caption {
    font-style: italic;
    color: var(--ekosos-muted, #6b6b6b);
    text-align: center;
    margin-top: 8px;
}

/* İki sütun görsel */
.ekosos-iki-sutun .wp-block-column img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Alıntı + portre */
.ekosos-portre img {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ekosos-alinti-metin {
    border-left: 4px solid var(--ekosos-primary, #7ccd57);
    padding-left: 16px;
    font-style: italic;
    margin: 0;
}

.ekosos-alinti-metin cite {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-weight: 600;
    color: var(--ekosos-ink, #0e1b01);
    font-size: 0.9rem;
}

/* CTA bandı (pattern + blog iskeletinde gömülü olan) */
.ekosos-cta-bandi {
    border-radius: 6px;
    margin: 28px 0;
}

.ekosos-cta-bandi h3 {
    color: inherit;
    margin: 0 0 6px;
}

.ekosos-cta-bandi p {
    margin: 6px 0 14px;
}

.ekosos-cta-bandi .wp-block-buttons {
    gap: 12px;
    flex-wrap: wrap;
}

.ekosos-cta-bandi .wp-block-button__link {
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 600;
    line-height: 1.1;
}

.ekosos-cta-bandi .is-style-outline .wp-block-button__link {
    border: 2px solid currentColor;
    background: transparent !important;
    color: inherit !important;
}

@media (max-width: 600px) {
    .ekosos-alinti-portre .wp-block-column[style*="flex-basis:30%"] {
        flex-basis: 100% !important;
    }
    .ekosos-alinti-portre .wp-block-column[style*="flex-basis:70%"] {
        flex-basis: 100% !important;
    }
    .ekosos-portre img {
        max-width: 140px;
        margin: 0 auto 12px;
    }
}


/* --- Blog arşiv (Posts page) düzeltmeleri --- */

/* PopularFX, infinite scroll aktifken footer'ı gizliyor; geri görünür yap. */
.infinite-scroll.neverending .site-footer,
.infinite-scroll .site-footer,
.infinite-scroll .pagelayer-footer {
    display: block !important;
}

/* Posts grid'inin her zaman normal akışta render olmasını garanti et —
   infinite-scroll JS kartları absolute bırakıp footer'a bindirmesin. */
.pagelayer-posts-container {
    display: grid !important;
    position: relative !important;
    clear: both;
}

.pagelayer-posts-container > * {
    position: relative !important;
    float: none !important;
}

/* Posts widget'tan sonra gelen her şeyin akışı temizlensin. */
.pagelayer-posts-holder::after,
.pagelayer-posts-container::after {
    content: "";
    display: block;
    clear: both;
}

/* Blog posts widget "sticky" ayarında — bu, kaydırınca widget'ı sabitleyip
   footer'ın içeriğe binmesine yol açıyor. Sticky'yi tamamen iptal et.
   CSS !important, Pagelayer JS'inin eklediği inline position'ı ezer. */
.pagelayer-archive_posts.pagelayer-sticky-ele,
.pagelayer-sticky-ele.pagelayer-archive_posts,
.pagelayer-col .pagelayer-sticky-ele {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    width: auto !important;
}

/* Tüm yazılar tek sayfada gösterildiği için işlevsiz "Daha Fazla Yükle"
   butonunu gizle (sonsuz kaydırma kapatıldı). */
.pagelayer-posts-holder .pagelayer_load_button,
.pagelayer-wposts .pagelayer_load_button,
.pagelayer-btn-load {
    display: none !important;
}

/* Mobil/tablet sütun sayısı (4 sütun mobilde sığmaz) */
@media (max-width: 1024px) {
    .pagelayer-posts-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
@media (max-width: 768px) {
    .pagelayer-posts-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 480px) {
    .pagelayer-posts-container {
        grid-template-columns: 1fr !important;
    }
}


/* --- acarhoca aktarilan yazilarda typography iyilestirme --- */

/* Daha okunakli punto + paragraf arasi nefes */
.ekosos-acarhoca-post .pagelayer-content p,
.ekosos-acarhoca-post .entry-content p,
.ekosos-acarhoca-post article p {
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: 1.5em;
    color: #2a2a2a;
}

/* Alt basliklar */
.ekosos-acarhoca-post .pagelayer-content h2,
.ekosos-acarhoca-post .entry-content h2,
.ekosos-acarhoca-post article h2 {
    font-size: 1.6rem;
    line-height: 1.35;
    margin: 1.8em 0 0.6em;
    color: var(--ekosos-ink, #0e1b01);
}

.ekosos-acarhoca-post .pagelayer-content h3,
.ekosos-acarhoca-post .entry-content h3,
.ekosos-acarhoca-post article h3 {
    font-size: 1.3rem;
    line-height: 1.4;
    margin: 1.5em 0 0.5em;
    color: var(--ekosos-ink, #0e1b01);
}

/* Vurgular */
.ekosos-acarhoca-post .pagelayer-content strong,
.ekosos-acarhoca-post .entry-content strong,
.ekosos-acarhoca-post article strong {
    font-weight: 700;
    color: var(--ekosos-ink, #0e1b01);
}

/* Mobilde bir tık daha küçük ama hala rahat */
@media (max-width: 600px) {
    .ekosos-acarhoca-post .pagelayer-content p,
    .ekosos-acarhoca-post .entry-content p,
    .ekosos-acarhoca-post article p {
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: 1.3em;
    }
}

/* Pagelayer post-info-vertical widget'inda yazar adi dar sidebar'da 3-4 satira
   bölünüyordu. Pagelayer'in inline ".p-XXX ..." kurali ile espit spesifiklik
   olduğundan body.single eklenerek spesifiklik artirildi. */
body.single .pagelayer-post-info-vertical .pagelayer-post-info-list-container,
body.single .pagelayer-post-info-vertical .pagelayer-post-info-list-container a,
body.single .pagelayer-post-info-vertical .pagelayer-post-info-list-container span,
body.single .pagelayer-post-info-vertical .pagelayer-post-info-label {
    font-size: 12px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    overflow: visible !important;
}
/* Widget container'i da metni kesmesin */
body.single .pagelayer-post-info-vertical,
body.single .pagelayer-post-info-vertical .pagelayer-post-info-container {
    overflow: visible !important;
}


/* --- acarhoca.com aktarim - "Devamini oku" butonu --- */

.ekosos-acarhoca-devami {
    margin: 32px 0 8px;
    padding: 20px 22px;
    background: #f7faf3;
    border-left: 4px solid var(--ekosos-primary, #7ccd57);
    border-radius: 4px;
}

.ekosos-acarhoca-devami__info {
    margin: 0 0 14px;
    font-size: 0.95rem;
    color: #2a2a2a;
    line-height: 1.5;
}

.ekosos-acarhoca-devami__btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--ekosos-primary, #7ccd57);
    color: var(--ekosos-surface, #ffffff);
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 150ms ease, transform 150ms ease;
}

.ekosos-acarhoca-devami__btn:hover,
.ekosos-acarhoca-devami__btn:focus-visible {
    background: var(--ekosos-primary-dark, #5fa83f);
    color: var(--ekosos-surface, #ffffff);
    transform: translateY(-2px);
    text-decoration: none;
}
