/* ═══════════════════════════════════════════════════════════
   responsive-detail.css
   Tüm detay sayfaları için kapsamlı mobil uyumluluk
   (Blog, Hizmet, Proje + Gutenberg blokları)
   ═══════════════════════════════════════════════════════════ */

/* ========== GENEL İÇERİK RESPONSIVE ========== */

/* ─────────────────────────────────────────────────────────
   Tablolar — Profesyonel responsive yaklaşımı
   ─────────────────────────────────────────────────────────
   "display: block + overflow" yapmıyoruz çünkü bu, tablonun
   width:100% davranışını kırar ve tabloyu içerik kadar
   daraltır. Bunun yerine:
     1) Tablo: normal table davranışında (display: table) kalır,
        genişliği %100 olur.
     2) Yatay scroll, .wp-block-table veya kendi sardığımız
        figure/.wm-table-wrap kapsayıcısı tarafından yönetilir.
     3) Çıplak (sarmalayıcısız) tablolarda ise CSS contain ile
        taşma engellenir; modern tarayıcılar bunu güzel yönetir.
   ───────────────────────────────────────────────────────── */

/* 1) Doğrudan tablo: full-width tutarlı görünüm */
.wt-content table,
.single-content table,
.single-proje-content table,
.single-hizmet-content table,
.entry-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  /* table-layout: fixed; -- gerekirse hücreler eşit dağılır; auto bırakıyoruz */
  display: table; /* önceki "block" kuralını ezer */
}

/* 2) WordPress'in kendi tablo bloğu / klasik tablo sarmalayıcısı */
.wt-content .wp-block-table,
.single-content .wp-block-table,
.single-proje-content .wp-block-table,
.single-hizmet-content .wp-block-table,
.entry-content .wp-block-table,
/* Klasik HTML tablolar için tema-spesifik sarmalayıcı */
.wt-content .wm-table-wrap,
.single-content .wm-table-wrap,
.single-proje-content .wm-table-wrap,
.single-hizmet-content .wm-table-wrap,
.entry-content .wm-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Scroll çubuğu görünür kalmasın sürekli, sadece gerektiğinde */
  scrollbar-width: thin;
}

/* 3) Sarmalayıcı yoksa çıplak tabloların taşmasını önle:
      içerik kapsayıcısının kendisine yatay scroll bağlamı ver */
.wt-content,
.single-content,
.single-proje-content,
.single-hizmet-content,
.entry-content {
  /* Üst kapsayıcı zaten max-width kontrolünde; tablolar buna uymalı */
  overflow-wrap: anywhere;
}

/* Çok geniş tablolarda hücrelerin sığması için */
.wt-content table th,
.wt-content table td,
.single-content table th,
.single-content table td,
.single-proje-content table th,
.single-proje-content table td,
.single-hizmet-content table th,
.single-hizmet-content table td,
.entry-content table th,
.entry-content table td {
  word-break: break-word;
  hyphens: auto;
}

/* Görseller taşmasın */
.wt-content img,
.single-content img,
.single-proje-content img,
.single-hizmet-content img,
.entry-content img {
  max-width: 100%;
  height: auto;
}

/* iFrame & Embed responsive */
.wt-content iframe,
.single-content iframe,
.entry-content iframe {
  max-width: 100%;
}

/* Pre/code blokları taşmasın */
.wt-content pre,
.single-content pre,
.entry-content pre {
  overflow-x: auto;
  max-width: 100%;
  word-break: break-word;
}

/* ========== TABLET (≤1024px) ========== */
@media (max-width: 1024px) {

  /* --- Hizmet & Proje Hero Grid --- */
  .wt-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .wt-hero-summary {
    position: static;
  }

  /* --- İçerik Layout (TOC + Content) --- */
  .wt-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 24px 60px;
  }

  .wt-toc {
    position: static;
    max-height: none;
  }

  .wt-toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
  }

  /* --- Blog Layout --- */
  .single-layout {
    grid-template-columns: 44px minmax(0, 1fr) 280px;
    gap: 18px;
  }

  .single-sidebar {
    position: static;
  }

  /* --- Kartlar / Grid Bloklar --- */
  .wt-cards {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .wt-reasons {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .wt-tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .wt-included {
    grid-template-columns: 1fr;
  }

  .wt-sector-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  /* --- Fiyat Tablosu --- */
  .wt-pricing {
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 10px;
  }

  /* --- İlgili İçerik Grid --- */
  .wt-related-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ========== MOBİL (≤768px) ========== */
@media (max-width: 768px) {

  /* --- Hizmet & Proje Hero --- */
  .wt-hero {
    padding: 96px 0 32px;
  }

  .wt-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .wt-h1 {
    font-size: 1.75rem;
  }

  .wt-h1-accent {
    font-size: 1rem;
  }

  .wt-lead {
    font-size: 1rem;
  }

  .wt-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wt-hero-actions .wt-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .wt-trust {
    flex-direction: column;
    gap: 10px;
  }

  .wt-hero-summary {
    position: static;
    border-radius: 14px;
  }

  /* --- İçerik Layout (TOC + Content) --- */
  .wt-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 20px 50px;
  }

  .wt-toc {
    position: static;
    max-height: none;
  }

  .wt-toc-inner {
    padding: 14px 16px;
  }

  .wt-toc-list {
    grid-template-columns: 1fr;
  }

  /* Services sidebar (proje detail) */
  .services-sidebar-list a {
    padding: 10px 8px;
    font-size: 0.88rem;
  }

  .sidebar-cta-box {
    margin-top: 20px !important;
    padding: 16px !important;
  }

  /* --- Blog Layout --- */
  .single-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .single-share-side {
    display: none;
  }

  .single-sidebar {
    position: static;
    margin-top: 24px;
  }

  .single-main {
    min-width: 0;
  }

  .single-title {
    font-size: 1.5rem;
  }

  .single-meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
  }

  .single-featured {
    border-radius: 12px;
  }

  .single-toc {
    padding: 14px 16px;
    border-radius: 12px;
  }

  /* --- Kartlar Grid → Single Column --- */
  .wt-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Kart List variant — mobilde stack */
  .wt-cards--list .wt-card {
    flex-direction: column;
    gap: 14px;
  }

  .wt-cards--list .wt-card-icon {
    margin-bottom: 0;
  }

  .wt-card {
    padding: 22px;
  }

  .wt-card h3 {
    font-size: 1.08rem;
  }

  .wt-card p {
    font-size: 0.9rem;
  }

  /* --- Reasons --- */
  .wt-reasons {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .wt-reason {
    padding: 24px;
  }

  /* --- Steps --- */
  .wt-steps li {
    grid-template-columns: 40px 1fr;
    padding: 16px;
    gap: 12px;
  }

  .wt-step-num {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  /* --- Tech Grid --- */
  .wt-tech-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .wt-tech {
    padding: 18px;
  }

  /* --- Included — 2 Column → 1 Column --- */
  .wt-included {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* --- Pricing Table (Fiyat) --- */
  .wt-pricing {
    border-radius: 10px;
    margin-left: -16px;
    margin-right: -16px;
  }

  .wt-pricing-table th,
  .wt-pricing-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  /* --- Sector Grid --- */
  .wt-sector-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* --- CTA Section --- */
  .wt-cta-box {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .wt-cta-box h2 {
    font-size: 1.5rem;
  }

  .wt-cta-box > p {
    font-size: 0.95rem;
  }

  .wt-cta-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .wt-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wt-cta-actions .wt-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .wt-contact-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .wt-contact-list span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* --- Floating CTA Button --- */
  .wt-float-cta {
    display: inline-flex;
    bottom: 18px;
    right: 18px;
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  /* --- İlgili İçerik Gridleri --- */
  .wt-related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* --- Yazar/Uzman Kutusu --- */
  .author-box,
  .expert-box {
    flex-direction: column;
    text-align: center;
    padding: 22px;
    gap: 16px;
  }

  .author-box-avatar img,
  .expert-box-avatar img {
    margin: 0 auto;
  }

  .author-box-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .author-box-footer,
  .expert-footer {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .expert-stats {
    justify-content: center;
  }

  .expert-socials {
    justify-content: center;
  }

  /* --- Blog Content Tables (mobil) --- */
  .single-content .wp-block-table,
  .single-content .wm-table-wrap,
  .wt-content .wp-block-table,
  .wt-content .wm-table-wrap,
  .entry-content .wp-block-table,
  .entry-content .wm-table-wrap {
    /* Mobilde scrollbar görünür ve dokunmatik kaydırma akıcı */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Tablo sığmazsa içerik genişliği kadar kaydırılabilir olsun */
    margin-left: 0;
    margin-right: 0;
  }

  /* Tablonun kendisi mobilde de full-width, ama hücrelerde
     içerik geniş ise scrollable olur (sarmalayıcı sayesinde) */
  .single-content table,
  .wt-content table,
  .entry-content table {
    width: 100%;
    min-width: 0;
  }

  .single-content table th,
  .single-content table td,
  .wt-content table th,
  .wt-content table td,
  .entry-content table th,
  .entry-content table td {
    font-size: 0.85rem;
    padding: 8px 10px;
    /* nowrap yapmıyoruz: mobilde kelimeler kırılsın, sığsın */
    white-space: normal;
    word-break: break-word;
  }

  /* --- Blog Share Bottom --- */
  .single-share {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  /* --- Blog Tags --- */
  .single-tags {
    gap: 6px;
  }

  .single-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* --- Sidebar Widgets --- */
  .sidebar-widget {
    padding: 16px;
    border-radius: 12px;
  }

  .sidebar-post-item a {
    grid-template-columns: 48px 1fr;
    gap: 10px;
  }

  .sidebar-post-thumb {
    width: 48px;
    height: 48px;
  }

  /* --- Proje Section Titles --- */
  .section-title,
  .wt-h2 {
    font-size: 1.5rem;
  }

  /* --- Gutenberg Columns blok — tek sütun --- */
  .wp-block-columns {
    flex-direction: column !important;
    gap: 16px !important;
  }

  .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  /* --- Gutenberg Gallery — 2 kolon (mobilde) --- */
  .wp-block-gallery.columns-3 .blocks-gallery-grid,
  .wp-block-gallery.columns-4 .blocks-gallery-grid,
  .wp-block-gallery.columns-3,
  .wp-block-gallery.columns-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* --- Gutenberg Table --- */
  .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wp-block-table table {
    min-width: 500px;
  }

  /* --- Gutenberg Buttons Group --- */
  .wp-block-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .wp-block-button .wp-block-button__link {
    width: 100%;
    text-align: center;
  }

  /* --- FAQ --- */
  .wt-content .wm-faq-q {
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .wt-content .wm-faq-a {
    padding: 0 16px 16px;
    font-size: 0.9rem;
  }

  /* --- Proje Archive Card --- */
  .proje-card {
    flex-direction: column;
  }

  .proje-card-left {
    padding: 30px 20px;
  }

  .proje-card-right {
    min-height: 220px;
  }

  .proje-card-title {
    font-size: 1.25rem;
  }

  .proje-card-desc {
    font-size: 0.93rem;
  }

  .proje-logo img {
    max-height: 55px;
  }

  /* --- Proje Hero Archive --- */
  .proje-hero-title {
    font-size: 2rem;
  }

  .proje-hero-desc {
    font-size: 1rem;
  }

  /* Breadcrumb wrap padding */
  .single-breadcrumb-wrap {
    padding: 84px 0 14px;
  }
}

/* ========== KÜÇÜK MOBİL (≤480px) ========== */
@media (max-width: 480px) {

  /* --- Hero --- */
  .wt-hero {
    padding: 86px 0 24px;
  }

  .wt-h1 {
    font-size: 1.45rem;
  }

  .wt-lead {
    font-size: 0.93rem;
  }

  /* --- Kartlar --- */
  .wt-card {
    padding: 18px;
  }

  .wt-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .wt-card h3 {
    font-size: 1rem;
  }

  /* --- Reason --- */
  .wt-reason {
    padding: 20px;
  }

  .wt-reason h3 {
    font-size: 1rem;
  }

  /* --- Steps --- */
  .wt-steps li {
    grid-template-columns: 32px 1fr;
    padding: 14px;
  }

  .wt-step-num {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  /* --- CTA --- */
  .wt-cta-box {
    padding: 22px 16px;
  }

  .wt-cta-box h2 {
    font-size: 1.35rem;
  }

  .wt-cta-grid {
    padding: 14px;
    gap: 16px;
  }

  /* --- Floating CTA --- */
  .wt-float-cta {
    bottom: 14px;
    right: 14px;
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  /* --- Blog --- */
  .single-title {
    font-size: 1.3rem;
  }

  .single-spot {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .single-content h2 {
    font-size: 1.25rem;
  }

  .single-content h3 {
    font-size: 1.08rem;
  }

  /* --- Proje Archive --- */
  .proje-card-left {
    padding: 24px 16px;
  }

  .proje-card-right {
    min-height: 180px;
  }

  .proje-hero-title {
    font-size: 1.7rem;
  }

  /* --- Gallery mobil — tek sütun --- */
  .wp-block-gallery.columns-2 .blocks-gallery-grid,
  .wp-block-gallery.columns-3 .blocks-gallery-grid,
  .wp-block-gallery.columns-4 .blocks-gallery-grid,
  .wp-block-gallery.columns-2,
  .wp-block-gallery.columns-3,
  .wp-block-gallery.columns-4 {
    grid-template-columns: 1fr !important;
  }

  /* --- Summary Card --- */
  .wt-hero-summary {
    padding: 18px;
  }

  .wt-summary-list > div {
    flex-direction: column;
    gap: 4px;
  }

  .wt-summary-list dd {
    text-align: left;
  }

  .wt-summary-list dt {
    font-size: 0.82rem;
  }

  /* --- Sidebar CTA widget --- */
  .sidebar-cta .sidebar-cta-badge {
    font-size: 0.7rem;
  }

  .sidebar-cta-title {
    font-size: 0.95rem;
  }
}

/* ========== HESAP SAYFALARI EK RESPONSIVE ========== */
@media (max-width: 768px) {

  /* Hesap dashboard tabloları yatay scroll */
  .acc-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .acc-table th,
  .acc-table td {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 10px 8px;
  }

  .acc-main {
    padding: 20px;
    border-radius: 14px;
  }

  .acc-grid {
    grid-template-columns: 1fr;
  }

  .acc-form-grid {
    grid-template-columns: 1fr;
  }

  /* Hesap sidebar mobil nav */
  .acc-nav {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .acc-nav a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}

/* ========== PROJE DETAY EK RESPONSIVE ========== */
@media (max-width: 768px) {

  /* Proje featured image */
  .proje-featured-image-wrap {
    margin-bottom: 24px !important;
    border-radius: 12px !important;
  }

  /* Proje sidebar CTA */
  .sidebar-cta-box h4 {
    font-size: 0.95rem !important;
  }

  .sidebar-cta-box p {
    font-size: 0.82rem !important;
  }

  .sidebar-cta-box .wt-btn {
    padding: 10px 16px;
    font-size: 0.88rem;
  }
}

/* ========== İÇERİK GÖRSELLERİ & EMBED ========== */
@media (max-width: 768px) {

  /* Video embeds — 16:9 oranında responsive */
  .wt-content .wp-block-embed,
  .single-content .wp-block-embed,
  .entry-content .wp-block-embed {
    max-width: 100%;
  }

  .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
  }

  .wp-block-embed__wrapper iframe,
  .wp-block-embed__wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  /* Figure/figcaption */
  .wt-content figure,
  .single-content figure,
  .entry-content figure {
    margin-left: 0;
    margin-right: 0;
  }

  /* Gutenberg Cover block */
  .wp-block-cover {
    min-height: 200px !important;
    padding: 20px !important;
  }

  .wp-block-cover__inner-container {
    width: 100% !important;
  }

  /* Gutenberg Media & Text — stack */
  .wp-block-media-text {
    grid-template-columns: 1fr !important;
  }

  .wp-block-media-text .wp-block-media-text__media {
    order: -1;
  }

  .wp-block-media-text .wp-block-media-text__content {
    padding: 16px 0 !important;
  }

  /* Gutenberg Separator */
  .wp-block-separator {
    margin: 24px auto !important;
  }
}

/* ========== EXPERT BOX MOBİL ========== */
@media (max-width: 768px) {

  .expert-box-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .expert-box-avatar {
    margin: 0 auto;
  }

  .expert-box-content {
    text-align: center;
  }

  .expert-certs ul {
    text-align: left;
    padding-left: 18px;
  }
}

/* ========== GENEL OVERFLOW KORUMASI ========== */
body {
  overflow-x: hidden;
}

.container,
.wt-content,
.single-content,
.single-main,
.entry-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
