/*
 Theme Name: Biz Child
 Theme URI: https://teknikekip.xyz/
 Description: Child theme for the Biz theme with cleaned <head> output and lightweight SEO-friendly defaults.
 Author: Hüseyin Yılmaz & ChatGPT
 Author URI: https://wp.tc
 Template: biz
 Version: 1.0.0
 License: GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: biz-child
 Tags: lightweight, seo, child-theme
*/

/* Add your child theme customizations below */

.icerik {
  width: 100%;
  max-width: 900px;
  margin: 0 auto; /* desktop'ta ortala */
  float: left;
}

/* 768px altı: tam yay ve kenarlara yaslan */
@media (max-width: 768px) {
  .icerik {
    width: 100%;
    max-width: 100%;
    margin: 0; /* mobilde tam yaslama */
    float: none;
  }
}

/* 1300px altı: kartları esnek yap */
@media (max-width: 1300px) {
  .post-wrap {
    border: none;
    padding: 5px 10px 25px;
    margin: 1rem auto;
    max-width: none;
    display: block; 
    box-sizing: border-box;
  }
}
@media (max-width: 768px) {
  .fipost,
  .fipost a,
  .fipost img {
    width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: cover; /* taşıyorsa düzgün kırpsın */
  }
}
@media (max-width: 768px) {
  .fipost { width: 100%; display:block; }
  .fipost .post-thumb,
  .fipost img {
    display:block;
    width:100% !important;
    height:auto !important;   /* oranı koru */
    max-width:100%;
    object-fit:contain;       /* cover değil, oranı bozma */
    transition:none !important; /* varsa animasyonu iptal et */
  }
}

/* Mobil: 768px ve altı */
@media (max-width: 768px) {
  .fipost,
  .fipost a,
  .fipost img {
    width: 100% !important;
    height: auto !important;
    display: block;
    max-width: 100% !important;
    object-fit: contain;
    transition: none !important;
  }
}

/* Masaüstü: 769px ve üzeri */
@media (min-width: 769px) {
  .fipost img.post-thumb {
    width: 100%;
    max-width: 350px;   /* 350px’i geçmesin */
    height: auto;
    display: block;
    margin: 0 auto;     /* ortala */
  }
}
.featured-image {
  text-align: center; /* kapsayıcıda ortala */
  margin: 0 auto;
}

.featured-image img {
  display: inline-block;
  max-width: 100%;   /* taşma olmasın */
  height: auto;      /* oranı koru */
}
/* Yazı içi görsellerde upscaling'i kapat: sadece küçült, büyütme */
.entry-content img,
.text img,
.wp-block-image img,
.wp-caption img {
  width: auto;          /* container'a göre zorla büyütme */
  max-width: 100%;      /* taşma olmasın */
  height: auto !important;
  object-fit: contain;  /* sabit yükseklik yoksa güvenli */
  display: block;
  margin-left: auto;
  margin-right: auto;   /* center görünüm */
}

/* WP caption kapsayıcı inline width'ünü geçersiz kıl */
.wp-caption {
  width: auto !important;
  max-width: 100% !important;
  text-align: center;
  margin: 1rem auto;
}

.wp-caption .wp-caption-text {
  font-size: 14px;
  color: #555;
  margin-top: .5rem;
}

/* Eğer temada global olarak img { width:100% } varsa, bunu masaüstünde kır */
@media (min-width: 769px) {
  .entry-content img,
  .text img,
  .wp-block-image img,
  .wp-caption img {
    width: auto !important;   /* 100% kurallarını ez */
    max-width: 100% !important;
  }
}
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: <?php echo get_theme_mod('cookie_banner_bg_color', '#333'); ?>;
    color: <?php echo get_theme_mod('cookie_banner_text_color', '#fff'); ?>;
    padding: 10px 15px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px 8px 0 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform: translateY(0);
    opacity: 1;
    width: 100%;
    box-sizing: border-box;
}

#cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
}

#cookie-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

#cookie-banner-text {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    text-align: center;
    word-wrap: break-word;
}

#cookie-banner-link {
    color: <?php echo get_theme_mod('cookie_banner_link_color', '#4CAF50'); ?>;
    text-decoration: underline;
    font-weight: bold;
    display: block;
    margin: 5px 0;
}

#cookie-banner-close {
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    background-color: #fff; /* Sabit arka plan rengi */
    color: #333; /* Sabit metin rengi */
    transition: background-color 0.3s ease, color 0.3s ease;
    position: absolute;
    bottom: 10px;
    right: 10px;
}

#cookie-banner-close:hover {
    background-color: #f0f0f0; /* Sabit üzerine gelme arka plan rengi */
    color: #f00; /* Sabit üzerine gelme metin rengi */
}

/* Masaüstü İçin Stiller */
@media (min-width: 1024px) {
    #cookie-banner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    #cookie-banner-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: calc(100% - 50px); /* Kapatma butonunun taşmamasını sağlar */
        max-width: none;
        padding: 0;
    }

    #cookie-banner-text {
        font-size: 16px;
        text-align: left;
        margin-right: 10px;
        flex: 1;
    }

    #cookie-banner-link {
        margin: 0 10px;
    }

    #cookie-banner-close {
        font-size: 22px;
        bottom: 10px;
        right: 10px;
        position: absolute;
        display:contents;
        color: #fff !important;
    }
}

/* Tablet İçin Stiller */
@media (max-width: 1023px) {
    #cookie-banner {
        padding: 10px;
    }

    #cookie-banner-content {
        flex-direction: column;
        align-items: center;
        position: relative; /* Kapalı butonun doğru şekilde yerleşmesini sağlamak için */
    }

    #cookie-banner-text {
        font-size: 14px;
        margin-bottom: 5px;
        text-align: center;
    }

    #cookie-banner-link {
        font-size: 14px;
        margin-bottom: 5px;
    }

    #cookie-banner-close {
        font-size: 20px;
        bottom: 10px;
        right: 10px;
    }
}

/* Mobil İçin Stiller */
@media (max-width: 480px) {
    #cookie-banner {
        padding: 10px 5px;
        flex-direction: column;
        justify-content: flex-start;
    }

    #cookie-banner-content {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: none;
        padding: 0;
        position: relative; /* Kapatma butonunun altta kalmasını sağlamak için */
    }

    #cookie-banner-text {
        font-size: 12px;
        margin-bottom: 5px;
        text-align: center;
    }

    #cookie-banner-link {
        font-size: 12px;
        margin-bottom: 5px;
    }

    #cookie-banner-close {
        font-size: 30px;
        position: absolute; /* En altı görünsün */
        bottom: 10px;
        right: 10px;
    }
    #cookie-banner-close{
        padding:0px 6px;
    }
}

		
.site-header {
  position: relative;
}

.container {
  max-width: 1200px;

}

.main-navigation {
  position: relative;
	display: flex;
	float:right;
}

.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  cursor: pointer;
}

.menu-items {
  list-style-type: none;
  padding: 0;
  display: flex;
	margin: 1rem 1rem 1rem 1rem;
}

.menu-items li {
  position: relative;
}

.menu-items li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
}

.menu-items li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
	    z-index: 25;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-items li:hover > ul {
  display: block;
}

.submenu-toggle {
  display: none;
}
	@media (min-width: 1250px) {
.menu-items {
	margin: 1rem -5rem 1rem 1rem;
}}

@media (max-width: 768px) {
	
  .menu-toggle {
    display: none;
  }

  .menu-icon {
           display: block;
        margin: 5px 1rem 1rem 0rem;
        font-size: 4rem;
        font-weight: 100;
        color: #333;
        font-family: ui-monospace;
  }

  .menu-items {
    display: none;
    flex-direction: column;
  }

  .menu-toggle:checked ~ .menu-items {
              padding: 1rem;
        display: inline-block;
        position: absolute;
        background: #effaff;
        top: 5rem;
        z-index: 25;
        right: 35px;
        width: max-content; }

  .menu-items li {
    width: 100%;
  }

  .menu-items li ul {
    position: static;
    box-shadow: none;
    background: transparent;
  }

  .menu-items li ul {
    display: none;
  }

  .menu-items li > input[type="checkbox"] {
    display: none;
  }

  .menu-items li.menu-item-has-children > a {
    display: inline-block;
  }

  .submenu-toggle {
    display: contents;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    float: right;
    margin-top: 5px;
  }

  .submenu-toggle::after {
            content: '▼';
        font-size: 17px;
        margin: 0px 0rem 0rem 1rem !important;
        line-height: 0px;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 5px 7px;
  }

  .menu-items li > input[type="checkbox"]:checked ~ .submenu-toggle::after {
    content: '-';
  }

  .menu-items li > input[type="checkbox"]:checked ~ ul {
    display: block;
  }
}

/* Tüm site fontu: Jost (değişken font), güvenli fallback'lerle */
:root {
  --font-sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* iPhone vb. önceki kuralları ezmek için !important kullanıyoruz */
html { font-family: var(--font-sans) !important; }
body, button, input, select, textarea { font-family: inherit !important; }

/* Başlık ve vurgular */
h1,h2,h3,h4,h5,h6 { font-weight: 700; }
strong,b { font-weight: 600; }
em,i { font-style: italic; }


/* === Mobil Tam Ekran Menü (child theme CSS) ===================== */

/* Desktop varsayılan: checkbox & ikon gizli, temanın mevcut menüsü çalışsın */
.main-navigation { position: relative; }
.menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.menu-icon { display: none; }

/* --------------------------------------------------------------- */
/* Mobil görünüm */
@media (max-width: 768px) {
  /* Hamburger ikonu görünür, tıklanabilir */
  .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    user-select: none;
    z-index: 10001; /* overlay üstünde */
    font-size: 0;   /* pseudo ile içerik vereceğiz */
    position: relative;
  }
  /* ≡ / × simgesi */
  .menu-icon::before {
    content: "≡";
    font-size: 28px;
    line-height: 1;
  }
  .menu-toggle:checked + .menu-icon::before {
    content: "×";
    color: #fff;
  }

  /* Menü kapalıyken gizle */
  .menu-items { display: none; }

  /* Tam ekran overlay menü */
  .menu-toggle:checked ~ .menu-items {
    display: flex;
    position: fixed;
    inset: 0;                /* top/right/bottom/left:0 */
    z-index: 10000;
    background: rgba(15, 23, 42, 0.96); /* koyu arka plan */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    /* Ortala ve dikey listele */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    padding: 2rem;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .25s ease, transform .25s ease;
  }
  .menu-toggle:checked ~ .menu-items {
    opacity: 1;
    transform: scale(1);
  }

  /* Menü linkleri */
  .menu-items > li { list-style: none; }
  .menu-items a {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;       /* ~20px */
    font-weight: 600;
    padding: .5rem 1rem;
    border-radius: .5rem;
  }
  .menu-items a:focus,
  .menu-items a:hover {
    background: rgba(255,255,255,.1);
    outline: none;
  }

  /* Arama kutusu overlay içinde şık görünüm */
  .menu-items .searchbox {
    width: min(92vw, 520px);
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
  }
  .menu-items .searchbox input[type="search"],
  .menu-items .searchbox input[type="text"],
  .menu-items .searchbox input {
    flex: 1;
    padding: .9rem 1rem;
    border-radius: .75rem;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    color: #fff;
  }
  .menu-items .searchbox input::placeholder { color: rgba(255,255,255,.75); }
  .menu-items .searchbox .searchbutton {
    padding: .9rem 1rem;
    border: 0;
    border-radius: .75rem;
    background: #fff;
    color: #111;
  }
  .menu-items .searchbox .searchicon { width: 18px; height: 18px; }

  /* Alt menüler */
  .menu-item-has-children > ul { margin-top: .25rem; }

  /* Hareketi azalt tercihine saygı */
  @media (prefers-reduced-motion: reduce) {
    .menu-toggle:checked ~ .menu-items { transition: none; }
    .menu-icon::before { transition: none; }
  }
}
