/* ══════════════════════════════════════════════
   Kurslar Sayfası — Özel Stiller
   ══════════════════════════════════════════════ */

/* Kurs fiyat tabloları — sütun genişlikleri */
.price-table:not(.sporcu-table) {
  table-layout: fixed;
}
/* 3 sütunlu: Öğrenci / Personel / Standart */
.price-table.cols-3 col:nth-child(1) { width: 20%; }
.price-table.cols-3 col:nth-child(2) { width: 55%; }
.price-table.cols-3 col:nth-child(3) { width: 25%; }
/* 4 sütunlu: KişiSayısı / Öğrenci / Personel / Standart */
.price-table.cols-4 col:nth-child(1) { width: 12%; }
.price-table.cols-4 col:nth-child(2) { width: 18%; }
.price-table.cols-4 col:nth-child(3) { width: 50%; }
.price-table.cols-4 col:nth-child(4) { width: 20%; }

.price-hero {
  background: url('../images/bg2.jpg') center center / cover no-repeat;
}

/* ── Schedule Table ── */
.course-schedule-wrap {
  border-radius: 8px;
  border: 1px solid rgba(10,22,40,0.1);
  margin-bottom: 1.5rem;
  overflow: visible;
}
.course-schedule-wrap .table-scroll {
  overflow-x: auto;
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
/* Sticky sub-title — JS ile yönetiliyor */
.schedule-sticky-subtitle {
  position: fixed;
  z-index: 89;
  display: none;
  background: #0a1628;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  padding: 0.7rem 1rem;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Sticky thead — JS ile yönetiliyor */
.schedule-sticky-clone {
  position: fixed;
  z-index: 88;
  overflow: hidden;
  pointer-events: none;
  display: none;
  background: #0a1628;
}
.schedule-sticky-clone table {
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
}
.schedule-sticky-clone th {
  background: #d5dbe3;
  padding: 0.9rem 1rem;
  text-align: left;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0a1628;
  border-bottom: 1px solid rgba(10,22,40,0.08);
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.schedule-sticky-clone th:nth-child(1) { background: #d5dbe3; }
.schedule-sticky-clone th:nth-child(2) { background: #c8cfd8; }
.schedule-sticky-clone th:nth-child(3) { background: #bcc5cf; }
.schedule-sticky-clone th:nth-child(4) { background: #b0bac6; }
.schedule-sticky-clone th:nth-child(5) { background: #a5b0bd; }
.schedule-table th:nth-child(1) { background: #d5dbe3; width: 250px; }
.schedule-table th:nth-child(2) { background: #c8cfd8; }
.schedule-table th:nth-child(3) { background: #bcc5cf; }
.schedule-table th:nth-child(4) { background: #b0bac6; }
.schedule-table th:nth-child(5) { background: #a5b0bd; }
.schedule-table th {
  background: #d5dbe3;
  padding: 0.7rem 0.6rem;
  text-align: left;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0a1628;
  border-bottom: 1px solid rgba(10,22,40,0.08);
  line-height: 1.4;
  vertical-align: middle;
}
.schedule-table td {
  padding: 0.4rem 1rem;
  border-bottom: 1px solid rgba(10,22,40,0.06);
  font-size: 0.85rem;
  color: #444;
  vertical-align: middle;
  line-height: 1.6;
  background: rgba(10,22,40,0.02);
}
.schedule-table tr.schedule-date-row:hover td {
  background: rgba(10,22,40,0.06);
}
/* Mobil header row + sütun başlıkları — masaüstünde gizli */
.schedule-group-header,
.schedule-col-headers {
  display: none;
}
/* Gün/Saat rowspan hücresi — masaüstünde görünür */
.schedule-gun-saat {
  color: #0a1628;
  font-weight: 600;
  width: 250px;
  max-width: 250px;
  border-right: 2px solid rgba(10,22,40,0.08);
  background: rgba(10,22,40,0.02) !important;
  text-transform: uppercase;
}
.card-header-title {
  text-transform: uppercase;
}
/* Grup ayırıcı — ilk tarih satırında üst border */
.schedule-date-row:has(.schedule-gun-saat) td {
  border-top: 2px solid rgba(10,22,40,0.1);
}
.schedule-table td small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: #888;
}
.saat {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #0a1628;
  font-weight: 500;
}
.saat i { color: rgba(10,22,40,0.4); margin-right: 4px; vertical-align: middle; font-size: 0.7em; }

/* ── Kurs bölüm başlığı iconları gizle ── */
.price-section-title i {
  display: none;
}
/* Mobilde grid tek sütuna düş (icon kolonu kalmasın) */
@media (max-width: 768px) {
  .price-section.collapsible .price-section-title {
    grid-template-columns: 1fr;
  }
}

/* ── Course Sub-Title ── */
.course-sub-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin: 0.5rem 0 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0a1628;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border-left: 3px solid #0a1628;
}
.course-sub-title::before {
  display: none;
}
.course-sub-title-toggle.open {
  background: #0a1628;
  color: #fff;
  border-left-color: #fff;
}

/* ── Course Note ── */
.course-note {
  background: rgba(10,22,40,0.04);
  border: 1px solid rgba(10,22,40,0.08);
  border-left: 3px solid #0a1628;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.7;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
}
/* Tablo → önemli not boşluğunu eşitle */
.price-table-wrap + .mobile-cards + .course-note,
.mobile-cards + .course-note {
  margin-top: 0.6rem;
}
.price-table-wrap:has(+ .mobile-cards + .course-note) {
  margin-bottom: 0;
}
.course-note strong {
  color: #0a1628;
  display: block;
  margin-bottom: 4px;
}

/* ── Belgeler Listesi ── */
.belgeler-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.belgeler-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(10,22,40,0.06);
  color: #555;
  line-height: 1.6;
  font-size: 0.88rem;
}
.belgeler-list li:last-child { border-bottom: none; }
.belgeler-list li::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #0a1628;
  flex-shrink: 0;
  margin-top: 2px;
}
.belgeler-warning {
  background: rgba(255,193,7,0.08);
  border: 1px solid rgba(255,193,7,0.25);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #555;
}

/* ── Sporcu Tablosu ── */
.sporcu-table { table-layout: fixed; }
.sporcu-table th:nth-child(1) { width: 30%; }
.sporcu-table th:nth-child(2) { width: 28%; text-align: center; }
.sporcu-table th:nth-child(3) { width: 14%; text-align: center; }
.sporcu-table th:nth-child(4) { width: 28%; text-align: center; }
.sporcu-table td:nth-child(1) { width: 30%; }
.sporcu-table td:nth-child(2) { width: 28%; font-family: 'Barlow Condensed', sans-serif; font-size: 1.1rem; font-weight: 600; color: #0a1628; text-align: center; }
.sporcu-table td:nth-child(3) { width: 14%; color: #888; text-align: center; font-size: 1.1rem; }
.sporcu-table td:nth-child(4) { width: 28%; font-family: 'Barlow Condensed', sans-serif; font-size: 1.1rem; font-weight: 600; color: #0a1628; text-align: center; }

/* ── Kurs Birimi Kutusu ── */
.kurs-birim-box {
  background: rgba(10,22,40,0.03);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(10,22,40,0.08);
  margin-top: 2.5rem;
}
.kurs-birim-box h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0a1628;
  margin-bottom: 1.5rem;
}
.kurs-birim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.kurs-birim-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.5rem;
}
.kurs-birim-grid p { font-size: 0.88rem; color: #555; line-height: 1.9; }
.kurs-birim-grid a { color: #0a1628; text-decoration: none; font-weight: 600; }
.kurs-birim-grid a:hover { text-decoration: underline; }
.badge-online {
  display: inline-block;
  padding: 3px 10px;
  background: #28a745;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-decoration: none;
  vertical-align: middle;
}

/* ── Tarih Durumları ── */
.date-past {
  text-decoration: line-through;
  color: #bbb !important;
  font-size: inherit;
}
.date-active-wrap {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  border: 1px solid #28a745;
  border-radius: 4px;
  padding: 2px 5px;
  margin: 1px 0;
}
.badge-active {
  display: inline-block;
  padding: 2px 8px;
  background: #28a745;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-decoration: none;
  animation: badgeBlink 1.5s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes badgeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Mobil kartlar — sadece mobilde görünür */
.schedule-mobile-cards { display: none; }

/* ── Masaüstü tablo başlık font + sabit yükseklik ── */
@media (min-width: 769px) {
  .schedule-table th {
    font-size: 1rem;
    padding: 0.9rem 1rem;
    line-height: 1.5;
  }
  .schedule-table td:not(.schedule-gun-saat) {
    font-size: 1.1rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    color: #0a1628;
    padding: 0.5rem 1rem;
    line-height: 1.3;
  }
  /* Alt başlık — tablo genişliğinde, tabloya yapışık */
  .course-sub-title {
    font-size: 1.55rem;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    border-radius: 0;
    border-left: none;
    background: #0a1628;
    color: #fff;
  }
  /* Tablo wrapper — üst köşeler düz, çift border olmasın */
  .course-sub-title + .course-schedule-wrap {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
    margin-top: 0;
  }
  /* Gün/Saat hücre içi düzen — masaüstü */
  .schedule-table td.schedule-gun-saat {
    font-size: 1rem;
    font-weight: 700;
  }
  .schedule-table td.schedule-gun-saat small {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: #888;
  }
  .schedule-table td.schedule-gun-saat .saat {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 2px;
  }
}

/* ── Mobil: Açık Bölüm Ayrışması ── */
@media (max-width: 768px) {
  .price-section.collapsible.open {
    background: #fff !important;
    box-shadow: 0 6px 28px rgba(10,22,40,0.16), 0 -3px 0 #0a1628, 0 3px 0 #0a1628;
    position: relative;
    z-index: 2;
  }
}

/* ── Mobil Responsive ── */
@media (max-width: 768px) {
  .kurs-birim-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  /* Masaüstü tablosunu mobilde gizle */
  .course-schedule-wrap {
    display: none;
  }
  /* Mobil kart yapısı */
  .schedule-mobile-cards {
    display: block;
    margin-bottom: 1rem;
  }
  .schedule-card {
    border: 1px solid rgba(10,22,40,0.15);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 1.1rem;
    background: #fff;
  }
  .schedule-card:last-child {
    margin-bottom: 0.8rem;
  }
  /* Alt başlık ile ilk kart arasındaki gap sıfır */
  .course-sub-title-toggle.open + .course-sub-body .schedule-mobile-cards {
    margin-top: 0;
  }
  .schedule-card-header {
    padding: 0.6rem 0.75rem;
    background: rgba(10,22,40,0.07);
    border-bottom: 1px solid rgba(10,22,40,0.1);
  }
  .card-header-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: #0a1628;
    line-height: 1.3;
  }
  .card-header-title small {
    display: inline;
    font-size: 0.82rem;
    font-weight: 400;
    color: #888;
    margin-left: 4px;
  }
  .card-header-saatler {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
  }
  .card-header-saatler .saat {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    margin-top: 0;
  }
  .card-header-saatler .saat i {
    font-size: 0.78em;
  }
  .schedule-card-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  .schedule-card-table thead th {
    background: #d5dbe3;
    color: #0a1628;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.4rem 0.55rem;
    line-height: 1.3;
    vertical-align: middle;
    text-align: left;
    border: none;
    height: 54px;
  }
  .schedule-card-table thead th:nth-child(1) { background: #d5dbe3; }
  .schedule-card-table thead th:nth-child(2) { background: #c8cfd8; }
  .schedule-card-table thead th:nth-child(3) { background: #bcc5cf; }
  .schedule-card-table thead th:nth-child(4) { background: #b0bac6; }
  .schedule-card-table tbody td {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.55rem;
    line-height: 1.4;
    border-bottom: 1px solid rgba(10,22,40,0.06);
    vertical-align: middle;
    background: transparent !important;
    height: 54px;
  }
  .date-active-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }
  .badge-active {
    font-size: 0.5rem;
    padding: 2px 4px;
    white-space: normal;
    line-height: 1.2;
  }
  /* Mobilde başlık zeminleri eşit genişlikte + tabloya yapışık */
  .course-sub-title {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    border: 1px solid rgba(10,22,40,0.15);
    border-radius: 0;
    font-size: 1.15rem;
    background: #0a1628;
    color: #fff;
    border-color: #0a1628;
  }
  .course-sub-title-toggle.open {
    background: #0a1628;
    color: #fff;
    border-left-color: #fff;
  }
  /* İçerik bloğu üstte boşluk bırakmasın */
  .course-sub-body.open {
    padding-top: 0 !important;
    margin-top: 0;
  }
  /* Alt başlığın altındaki ilk kartın üst border'ını kaldır (çift çizgi olmasın) */
  .course-sub-body .schedule-mobile-cards .schedule-card:first-child {
    border-top: none;
  }
}

/* ══════════════════════════════════════════════
   Fiyat Gizleme
   ══════════════════════════════════════════════ */
.price-sub-hidden { display: none !important; }
.price-content-hidden { display: none !important; }

/* ══════════════════════════════════════════════
   Fiyat Butonları — Kurs Başlığı Yanında
   ══════════════════════════════════════════════ */
.price-section-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
/* Başlık margin-bottom sıfırla + line-height sıkıştır ki flex center görsel olarak ortalansın */
.price-section-header .price-section-title {
  margin-bottom: 0;
  line-height: 1;
}
/* Masaüstü: butonlar başlıktan uzak, alt başlık da aşağıda */
@media (min-width: 769px) {
  .price-section-header {
    gap: 20px;
    margin-bottom: 1.2rem;
  }
}
.price-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  align-self: center;
}
/* Desktop / genel buton — outline stili */
.price-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 9px 22px;
  background: transparent;
  color: #0a1628;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 2px solid rgba(10,22,40,0.4);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.price-modal-btn:hover {
  background: #0a1628;
  color: #fff;
  border-color: #0a1628;
}
.price-modal-btn i { display: none; }

/* Mobil: kapalıyken gizle, açıkken göster + chevron gizle */
@media (max-width: 768px) {
  .price-btn-group { display: none; }

  /* Açıkken: başlıkla aynı satırda, sağda — chevron gizle */
  .has-price-btns.open .price-section-header {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
  }
  .has-price-btns.open .price-section-header .price-section-title {
    flex: 1;
    min-width: 0;
  }
  /* Fiyat butonu olan bölümlerde açıkken chevron'ı gizle */
  .has-price-btns.open .price-section-header::after {
    display: none !important;
  }
  .has-price-btns.open .price-btn-group {
    display: flex;
    flex-shrink: 0;
    width: auto;
    justify-content: flex-end;
    gap: 4px;
    padding: 0;
    margin-left: 8px;
  }
  /* Mobil buton — kompakt, icon'suz, dik köşe */
  .has-price-btns.open .price-modal-btn {
    font-size: 0.58rem;
    padding: 3px 8px;
    border-width: 1.5px;
    gap: 0;
    border-radius: 0;
  }
}

/* ══════════════════════════════════════════════
   Fiyat Modal
   ══════════════════════════════════════════════ */
#price-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}
#price-modal.open { display: block; }

.price-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.price-modal-box {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}
.price-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #0a1628;
  flex-shrink: 0;
}
.price-modal-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}
.price-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.18s;
}
.price-modal-close:hover { color: #fff; }
.price-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Masaüstü: modal daha büyük, yazılar daha iri */
@media (min-width: 769px) {
  .price-modal-box {
    width: 820px;
    max-width: 82vw;
    max-height: 82vh;
  }
  .price-modal-head {
    padding: 1.4rem 2rem;
  }
  .price-modal-title {
    font-size: 1.5rem;
  }
  .price-modal-body {
    padding: 2rem 2.5rem;
  }
  #price-modal .price-table th {
    font-size: 1rem;
    padding: 0.7rem 1rem;
  }
  #price-modal .price-table td {
    font-size: 1.35rem;
    padding: 0.8rem 1rem;
    font-weight: 600;
  }
}
/* Modal içinde price-table-wrap her zaman görünür */
#price-modal .price-table-wrap {
  display: block !important;
  overflow-x: auto;
}
/* Mobilde modal tablo — taşmayı önlemek için küçük font */
@media (max-width: 768px) {
  #price-modal .price-table th,
  #price-modal .price-table td {
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
    line-height: 1.4;
  }
}
.modal-open { overflow: hidden; }
