/* ═══════════════════════════════════════════════════════════════
   PUBLIC SITE — Spor Kulübü Yönetim
   Renkler clubs.json üzerinden CSS değişkenleriyle gelir
═══════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
  --primary:    #111111;
  --primary-d:  #000000;
  --accent:     #2A2A2A;
  --soft:       #F5F5F5;
  --mid:        #E5E5E5;
  --bg:         #FFFFFF;
  --border:     #E0E0E0;
  --txt:        #1A1A1A;
  --txt2:       #4A4A4A;
  --shadow-rgb: 17,17,17;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }

/* LOADING */
#site-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; color: #fff;
  transition: opacity .3s ease;
}
#site-loading.hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; font-weight: 600; letter-spacing: 1px; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 24px;
}
.header-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--txt);
  flex-shrink: 0;
}
#header-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(var(--shadow-rgb), .15);
}
.header-name {
  font-weight: 800; font-size: 15px;
  line-height: 1.2;
  max-width: 220px;
}
.header-nav {
  display: flex; gap: 4px; flex: 1;
}
.nav-link {
  padding: 8px 14px;
  font-weight: 600; font-size: 14px;
  color: var(--txt2);
  border-radius: 8px;
  transition: all .15s;
}
.nav-link:hover {
  background: var(--soft);
  color: var(--primary);
}
.nav-link.active {
  background: var(--primary);
  color: #fff;
}
.header-cta {
  padding: 9px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 22px;
  font-weight: 700; font-size: 13px;
  border: 1.5px solid var(--primary);
  transition: all .15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.header-cta:hover {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.header-toggle {
  display: none;
  background: transparent; border: none;
  font-size: 24px; cursor: pointer;
  color: var(--txt);
}
.header-mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.header-mobile-nav.hidden { display: none !important; }
.m-nav-link {
  padding: 12px 8px;
  font-weight: 600;
  color: var(--txt);
  border-bottom: 1px solid var(--border);
}
.m-nav-link:last-of-type { border-bottom: none; }
.m-nav-cta {
  margin-top: 10px;
  padding: 12px;
  background: var(--primary); color: #fff;
  border-radius: 10px; text-align: center;
  font-weight: 700;
}

/* MAIN / PAGES */
.page { display: none; }
.page.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.container {
  max-width: 1100px; margin: 0 auto;
  padding: 40px 20px;
}
.page-title {
  font-size: 32px; font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}
.page-sub {
  color: var(--txt2);
  margin-bottom: 24px;
  font-size: 15px;
}

/* HERO */
.hero {
  position: relative;
  min-height: 480px;
  background:
    linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.hero[data-bg]::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--hero-bg) center/cover no-repeat;
  opacity: .35;
}
.hero-overlay {
  position: relative;
  max-width: 800px; width: 100%;
}
.hero-content { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-logo {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
#hero-title {
  font-size: 38px; font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.hero-tagline {
  font-size: 16px;
  opacity: .92;
  max-width: 600px;
}
.hero-cta-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.btn {
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  background: var(--accent);
  border-color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.7);
  font-weight: 700;
}
.btn-ghost:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* BLOCKS */
.block {
  margin: 48px 0;
}
.block-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}
.block-text {
  font-size: 16px;
  color: var(--txt);
  line-height: 1.75;
  white-space: pre-wrap;
}
.empty-mini {
  color: var(--txt2);
  font-size: 14px;
  font-style: italic;
  padding: 16px;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}
.stat-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-lbl {
  font-size: 13px;
  color: var(--txt2);
  margin-top: 6px;
  font-weight: 600;
}

/* SPONSORS */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  align-items: center;
}
.sponsor-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.sponsor-card img {
  width: 100%; height: 60px;
  object-fit: contain;
}
.sponsor-card .sponsor-name {
  font-size: 12px; font-weight: 600; color: var(--txt2);
}

/* CLASSES (Antrenmanlar) */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.class-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.class-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
}
.class-branch {
  display: inline-block;
  background: var(--soft);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: .3px;
}
.class-name {
  font-size: 17px; font-weight: 800;
  margin-bottom: 6px;
  color: var(--txt);
}
.class-meta {
  font-size: 13px;
  color: var(--txt2);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}

/* CARDS (Duyurular) */
.cards-list {
  display: flex; flex-direction: column; gap: 12px;
}
.announcement-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  border-left: 4px solid var(--primary);
}
.announcement-title {
  font-size: 17px; font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}
.announcement-date {
  font-size: 12px;
  color: var(--txt2);
  margin-bottom: 10px;
}
.announcement-body {
  font-size: 14px;
  color: var(--txt);
  white-space: pre-wrap;
  line-height: 1.6;
}
.announcement-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}

/* NEWS */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(var(--shadow-rgb), .2);
}
.news-cover {
  width: 100%; height: 180px;
  background: var(--soft);
  background-size: cover;
  background-position: center;
}
.news-body { padding: 16px; }
.news-date {
  font-size: 11px; font-weight: 700;
  color: var(--accent); /* sarı vurgu */
  text-transform: uppercase;
  letter-spacing: .8px;
}
.news-title {
  font-size: 17px; font-weight: 800;
  margin: 6px 0 8px;
  color: var(--txt);
  line-height: 1.3;
}
.news-excerpt {
  font-size: 13.5px;
  color: var(--txt2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}
.contact-info { display: flex; flex-direction: column; gap: 12px; }
.contact-row {
  display: flex; gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.contact-icon {
  flex: 0 0 44px; height: 44px;
  background: var(--soft);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.contact-body { flex: 1; min-width: 0; }
.contact-label {
  font-size: 11px; font-weight: 700;
  color: var(--txt2);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.contact-value {
  font-size: 15px; font-weight: 600;
  color: var(--txt);
  margin-top: 2px;
  word-break: break-all;
}
a.contact-value:hover { color: var(--primary); text-decoration: underline; }

.contact-map {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 320px;
  overflow: hidden;
}
.contact-map iframe { width: 100%; height: 100%; border: 0; }

/* FOOTER */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.85);
  margin-top: 60px;
  padding: 32px 20px 24px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
#footer-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  object-fit: contain;
}
.footer-name { font-weight: 800; font-size: 15px; color: #fff; }
.footer-tag { font-size: 12px; opacity: .75; }
.footer-meta { font-size: 12px; opacity: .75; text-align: right; }
.footer-credit { margin-top: 4px; }

/* MODAL */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 28px 24px 24px;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: var(--soft); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.news-modal-cover {
  width: calc(100% + 48px);
  margin: -28px -24px 18px;
  height: 240px;
  background: var(--soft);
  background-size: cover;
  background-position: center;
  border-radius: 16px 16px 0 0;
}
.news-modal-date {
  font-size: 12px; font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}
.news-modal-title {
  font-size: 26px; font-weight: 800;
  color: var(--primary);
  margin: 6px 0 14px;
  line-height: 1.2;
}
.news-modal-body {
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* MOBILE */
@media (max-width: 820px) {
  .header-nav, .header-cta { display: none; }
  .header-toggle { display: block; }
  .header-mobile-nav { display: flex !important; }
  .header-mobile-nav.hidden { display: none !important; }
  #hero-title { font-size: 28px; }
  .hero { min-height: 380px; padding: 40px 20px; }
  .hero-logo { width: 80px; height: 80px; }
  .page-title { font-size: 26px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-num { font-size: 26px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-map { min-height: 240px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}
