/*
Theme Name: Turgay İşler Fayans
Theme URI: https://turgayisler.biz.tr/
Author: Turgay İşler
Description: Premium Görsel odaklı, LCP optimizasyonlu, kusursuz galeri yapısına sahip profesyonel WordPress teması.
Version: 2.1.0
License: GPLv2 or later
Text Domain: turgayisler-fayans
*/

:root {
  --container: 1400px;
  --gap: 18px;
  --radius: 16px;
  --shadow: 0 10px 25px rgba(0,0,0,.05);
  --text: #111;
  --muted: #666;
  --line: rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: #fcfcfc; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 980px) { .container { padding-left: 20px; padding-right: 20px; } }

/* ==========================================================================
   1. PREMIUM HEADER (GLASSMORPHISM) & NAVİGASYON
   ========================================================================== */
.site-header {
  position: sticky; 
  top: 0; 
  z-index: 50;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.04) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  transition: all 0.3s ease;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand .title { font-weight: 900; letter-spacing: -0.5px; font-size: 22px; color: #111; }
.brand .tagline { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 500; }

.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; align-items: center; }
.primary-nav li { margin: 0; }
.primary-nav a { display: inline-block; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: #444; transition: all 0.2s; }
.primary-nav a:hover { background: rgba(0,0,0,.04); color: #000; }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { background: rgba(0,0,0,.06); color: #000; font-weight: 700; }

/* Masaüstü CTA Butonu */
.header-cta-btn { 
  display: inline-block; 
  background: #111; 
  color: #fff !important; 
  padding: 10px 18px; 
  border-radius: 8px; 
  font-weight: 800; 
  font-size: 14px; 
  transition: 0.2s; 
  margin-left: 15px; 
}
.header-cta-btn:hover { background: #333; transform: translateY(-2px); }

.nav-toggle { display: none; }

/* Mobil Menü Animasyonları */
@media (max-width: 900px) {
  .header-cta-btn { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; border: none; background: rgba(0,0,0,0.04); border-radius: 8px; padding: 10px 14px; cursor: pointer; }
  .primary-nav { position: absolute; left: 0; right: 0; top: 100%; background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,0,0,.05); display: none; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
  .primary-nav.open { display: block; animation: slideDown 0.3s ease forwards; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px; }
  .primary-nav a { width: 100%; padding: 12px; border-radius: 8px; }
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   2. GENEL DÜZEN VE KART ANİMASYONLARI
   ========================================================================== */
.layout { display: flex; gap: var(--gap); padding: 24px 0; }
.main { flex: 1 1 auto; min-width: 0; }
.sidebar { flex: 0 0 28%; max-width: 28%; }
@media (max-width: 900px) { .layout { flex-direction: column; } .sidebar { flex: 1 1 auto; max-width: 100%; } }

.widget { border: 1px solid rgba(0,0,0,0.05); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); background: #fff; margin-bottom: var(--gap); }
.widget-title { font-weight: 900; margin: 0 0 14px; font-size: 15px; letter-spacing: .2px; }

/* Premium Uçan Kart Efektleri (Hover) */
.post-card, .what-card, .service-card, .hero-card, .video-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.post-card:hover, .what-card:hover, .service-card:hover, .video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.08);
}

/* ==========================================================================
   3. ANA SAYFA: NELER YAPIYORUZ & SON İŞLER
   ========================================================================== */
/* Neler Yapıyoruz Kartları (Kusursuz 4'lü Izgara ve 16:9 Oran) */
.what-grid--cards { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 16px; 
}
@media (max-width: 900px) { .what-grid--cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .what-grid--cards { grid-template-columns: 1fr; } }

.what-card img { 
  width: 100%; 
  aspect-ratio: 16/9; 
  height: auto; 
  object-fit: cover; 
  display: block; 
}
.what-card-title { padding: 14px; font-weight: 800; text-align: center; font-size: 15px; }

/* Son İşler Kartları */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--gap); }
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 680px) { .card-grid { grid-template-columns: 1fr; } }

.post-card .thumb { display: block; width: 100%; aspect-ratio: 4/3; overflow: hidden; background: #f3f3f3;}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .cap { padding: 14px; font-weight: 800; font-size: 16px; line-height: 1.3; }

/* ==========================================================================
   4. TEKİL YAZI (SINGLE) VE KUSURSUZ GALERİ ORANLARI
   ========================================================================== */
.single-title { font-size: 28px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 16px; }

.single-media-card {
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Tekil Sayfa: Küçük Resimler (Thumbnails) */
.single .gallery4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}
.single .gallery4 a { 
  display: block;
  border-radius: 12px; 
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}
/* Thumbnails TAM KARE (1:1) Oranında Sabitlendi */
.single .gallery4 img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1; 
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.single .gallery4 a:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.1);
}
.single .gallery4 a:hover img { transform: scale(1.08); }

@media (max-width: 980px) {
  .single .gallery4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 640px) {
  .single .gallery4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .single .gallery4 a { border-radius: 10px; }
}

/* Galeri Sayfasındaki Şehir Filtresini Gizle */
.tist-filter,
.page-template-gallery .tist-filter,
select[name="sehir_filtresi"] { display: none !important; }

/* ==========================================================================
   5. YILDIZ OYLAMA (PREMIUM) VE YORUMLAR
   ========================================================================== */
.tist-rating {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 16px;
  background: #fafafa;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.tist-rating-stars { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tist-star {
  appearance: none; border: 0; background: rgba(0,0,0,.04); border-radius: 10px;
  padding: 8px 12px; cursor: pointer; font-size: 20px; line-height: 1;
  color: #ccc; transition: all 0.2s ease;
}
.tist-star:hover { background: #fff; color: #f5b301; transform: scale(1.15); box-shadow: 0 4px 10px rgba(0,0,0,0.05);}
.tist-rating-meta { margin-top: 10px; font-size: 14px; color: var(--muted); font-weight: 600;}

/* ==========================================================================
   6. VİDEOLAR
   ========================================================================== */
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .video-grid { grid-template-columns: 1fr; } }
.video-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.video-card .cap { padding: 12px 14px; font-weight: 800; }

/* ==========================================================================
   7. WHATSAPP YÜZEN BUTON VE LIGHTBOX
   ========================================================================== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999; display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 999px; background: #25D366; color: #fff !important;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4); transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.05) translateY(-3px); box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5); }
.wa-float__icon { font-size: 20px; line-height: 1; }
.wa-float__text { font-weight: 800; font-size: 14px; letter-spacing: 0.2px;}
@media (max-width: 480px){
  .wa-float__text { display: none; }
  .wa-float { padding: 14px; right: 16px; bottom: 16px; }
}

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 9999; backdrop-filter: blur(5px); }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 100%); max-height: 85vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 46px; height: 46px; border-radius: 999px;
  cursor: pointer; font-size: 28px; display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.lightbox .lb-close { top: 20px; right: 20px; font-size: 24px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox button:hover { background: rgba(255,255,255,.3); }

/* WebP <picture> wrapper */
.tist-picture { display: block; }
.tist-picture > img { display: block; width: 100%; height: auto; }

/* ==========================================================================
   8. ANA SAYFA: PREMIUM HESAPLAMA BANNER'I (YENİ EKLENEN BÖLÜM)
   ========================================================================== */
.premium-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f8f9fa 0%, #eef1f5 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 24px 32px;
  margin: 10px 0 40px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  gap: 20px;
}

.premium-cta-banner .cta-content h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 900;
  color: #111;
  letter-spacing: -0.5px;
}

.premium-cta-banner .cta-content p {
  margin: 0;
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

.premium-btn {
  display: inline-flex;
  align-items: center;
  background: #111;
  color: #fff !important;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.premium-btn:hover {
  background: #333;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

@media (max-width: 760px) {
  .premium-cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .premium-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   3. ANA SAYFA: NELER YAPIYORUZ & SON İŞLER (PREMIUM KARTLAR)
   ========================================================================== */

/* --- Sayfa İçi Genel Başlık (H2) Stilleri (Nefes Payı) --- */
main h2, .neler-yapiyoruz-baslik h2, .wp-block-heading {
  font-size: 32px !important;
  font-weight: 900 !important;
  letter-spacing: -1px !important;
  color: #111 !important;
  margin-top: 50px !important; /* Üstteki öğe ile arayı açar */
  margin-bottom: 12px !important;
}

/* --- Neler Yapıyoruz Kartları --- */
.what-grid--cards { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 20px; /* Kartlar arası boşluk arttı */
  margin-top: 24px; 
  margin-bottom: 60px; /* Alt bölümle araya nefes payı eklendi */
}
@media (max-width: 900px) { .what-grid--cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .what-grid--cards { grid-template-columns: 1fr; } }

.what-card { 
  background: #fff; 
  border-radius: 16px; 
  overflow: hidden; 
  border: 1px solid rgba(0,0,0,0.06); 
  box-shadow: 0 4px 15px rgba(0,0,0,0.02); 
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.what-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.1);
}
.what-card img { 
  width: 100%; 
  aspect-ratio: 16/9; 
  height: auto; 
  object-fit: cover; 
  display: block; 
  border-bottom: 1px solid rgba(0,0,0,0.03); /* Resim ile yazı arasına ince zarif çizgi */
}
.what-card-title { 
  padding: 18px 14px; /* Yazı etrafındaki boşluk (padding) arttı */
  font-weight: 800; 
  text-align: center; 
  font-size: 16px; /* Yazı biraz büyüdü */
  color: #111;
  background: linear-gradient(to bottom, #ffffff, #fdfdfd);
}

/* --- Son İşler Kartları --- */
.card-grid { 
  display: grid; 
  grid-template-columns: repeat(3, minmax(0,1fr)); 
  gap: 24px; /* Kartlar arası ferahlık */
  margin-top: 24px; 
}
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 680px) { .card-grid { grid-template-columns: 1fr; } }

.post-card { 
  background: #fff; 
  border: 1px solid rgba(0,0,0,0.06); 
  border-radius: 16px; 
  overflow: hidden; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.02); 
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.1);
}
.post-card .thumb { 
  display: block; 
  width: 100%; 
  aspect-ratio: 4/3; 
  overflow: hidden; 
  background: #f3f3f3;
}
.post-card .thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); 
}
.post-card:hover .thumb img { 
  transform: scale(1.08); /* Kartın içindeki resim çok daha akıcı bir şekilde yakınlaşacak */
}
.post-card .cap { 
  padding: 20px; /* İçerik boşluğu genişletildi */
  flex-grow: 1; 
}
.post-card .cap a { 
  font-weight: 800; 
  font-size: 18px; /* Proje başlıkları daha okunaklı yapıldı */
  line-height: 1.4; 
  color: #111;
  text-decoration: none;
  transition: color 0.2s ease;
}
.post-card:hover .cap a {
  color: #555;
} 

/* ==========================================================================
   8. SAYFALAMA (PAGINATION) STİLLERİ
   ========================================================================== */
.tist-pagination { margin-top: 50px; text-align: center; }
.tist-pagination ul { list-style: none; padding: 0; margin: 0; display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tist-pagination ul li { margin: 0; }
.tist-pagination ul li a, 
.tist-pagination ul li span {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 18px; background: #fff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px; font-weight: 700; font-size: 15px; color: #111;
    text-decoration: none; transition: all 0.2s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.tist-pagination ul li a:hover { background: #f3f3f3; transform: translateY(-2px); }
.tist-pagination ul li span.current {
    background: #111; color: #fff; border-color: #111; box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
