/* ============ DernekSepeti Web — Tasarım Sistemi (mobil uygulama ile aynı dil) ============ */
:root {
  /* Marka (indigo) — Flutter AppColors */
  --brand: #4338CA;
  --brand-light: #6366F1;
  --brand-dark: #1E1B4B;
  --teal: #0EA5A4;
  --gold: #D4A017;
  --coral: #EF4444;

  /* Per-dernek tema (JS ile override edilir) — varsayılan marka */
  --p: #4338CA;
  --p-dark: #1E1B4B;
  --p-light: #EEF2FF;
  --p-accent: #6366F1;
  --p-surface: #EEF2FF;
  --p-grad: linear-gradient(135deg, #A5B4FC, #818CF8, #4338CA);

  --bg: #FAFAFB;
  --surface: #F4F4F7;
  --card: #FFFFFF;
  --text: #111827;
  --text-2: #6B7280;
  --hint: #9CA3AF;
  --border: #E5E7EB;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(17, 24, 39, 0.07);
  --shadow-lg: 0 14px 40px rgba(17, 24, 39, 0.14);
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-2); }
.hide-sm { display: inline; }

/* ===== Header ===== */
#header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 19px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--p-grad); color: #fff; font-weight: 900; font-size: 15px; letter-spacing: .5px;
  box-shadow: 0 4px 14px rgba(67, 56, 202, .35);
}
.brand-mark.sm { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; }
.brand-name span { color: var(--brand-light); }
.bar-right { display: flex; align-items: center; gap: 14px; }
.rt-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800;
  color: #059669; background: #ECFDF5; padding: 5px 10px; border-radius: 999px;
}
.rt-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #10B981; animation: pulse 1.6s infinite; }
.rt-badge.off { color: var(--hint); background: var(--surface); }
.rt-badge.off .dot { background: var(--hint); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
.user-chip { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; background: var(--p-grad); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }

/* ===== Buttons ===== */
.btn-primary, .btn-ghost {
  font-family: inherit; font-weight: 800; cursor: pointer; border: none; border-radius: 12px;
  padding: 11px 18px; font-size: 14px; transition: transform .12s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--p); color: #fff; box-shadow: 0 6px 18px rgba(67, 56, 202, .28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(67, 56, 202, .36); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.btn-primary.block { width: 100%; padding: 13px; margin-top: 8px; }
.btn-primary.sm, .btn-ghost.sm { padding: 8px 14px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden; padding: 64px 0 52px;
  background: radial-gradient(1200px 400px at 50% -120px, rgba(99, 102, 241, .18), transparent 70%),
              linear-gradient(180deg, #fff, var(--bg));
}
.hero h1 { font-size: clamp(32px, 6vw, 54px); font-weight: 900; letter-spacing: -.5px; line-height: 1.05; }
.grad-text { background: var(--p-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 16px 0 26px; font-size: 17px; color: var(--text-2); max-width: 620px; }
.hero-sub b { color: var(--brand-light); }
.search-wrap {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 4px 6px 4px 16px; max-width: 560px; box-shadow: var(--shadow);
}
.search-wrap .ic { width: 22px; height: 22px; color: var(--hint); flex: none; }
.search-wrap input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 16px; padding: 14px 4px; background: transparent; color: var(--text); }

/* ===== Section head ===== */
.section-head { display: flex; align-items: center; gap: 10px; margin: 40px 0 18px; }
.bar-accent { width: 6px; height: 26px; border-radius: 4px; background: var(--p-grad); box-shadow: 0 0 10px rgba(99,102,241,.5); }
.section-head h2 { font-size: 22px; font-weight: 900; }

/* ===== Grid & cards ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding-bottom: 24px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card.pad { padding: 20px; }

.assoc-card { display: flex; flex-direction: column; transition: transform .16s, box-shadow .22s; }
.assoc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.assoc-cover { height: 104px; position: relative; }
.assoc-logo {
  position: absolute; left: 18px; bottom: -26px; width: 60px; height: 60px; border-radius: 16px;
  background: #fff; border: 3px solid #fff; box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center;
}
.assoc-logo img { width: 100%; height: 100%; object-fit: cover; }
.assoc-logo span { font-weight: 900; color: var(--c, var(--p)); font-size: 22px; }
.assoc-body { padding: 34px 18px 18px; }
.assoc-title { display: flex; align-items: center; gap: 6px; }
.assoc-title h3 { font-size: 17px; font-weight: 800; line-height: 1.2; }
.assoc-tagline { color: var(--text-2); font-size: 13.5px; margin: 4px 0 12px; min-height: 20px; }
.assoc-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface); padding: 5px 10px; border-radius: 999px; }
.pill .ic-sm { width: 14px; height: 14px; }

/* ===== Verified ===== */
.verified { width: 18px; height: 18px; color: var(--brand-light); flex: none; }
.verified.big { width: 22px; height: 22px; vertical-align: -3px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.3)); }

/* ===== Detail hero ===== */
.detail-hero { position: relative; min-height: 240px; display: flex; align-items: flex-end; }
.detail-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.55)); }
.detail-hero-inner { position: relative; display: flex; align-items: flex-end; gap: 20px; padding-bottom: 24px; padding-top: 80px; }
.detail-logo {
  width: 92px; height: 92px; border-radius: 22px; background: #fff; border: 3px solid #fff;
  box-shadow: var(--shadow-lg); overflow: hidden; display: grid; place-items: center; flex: none; cursor: zoom-in;
  transition: transform .14s;
}
.detail-logo:hover { transform: scale(1.04); }
.detail-logo img { width: 100%; height: 100%; object-fit: cover; }
.detail-logo span { font-size: 34px; font-weight: 900; color: var(--p); }
.detail-head { color: #fff; padding-bottom: 4px; }
.detail-head h1 { font-size: clamp(22px, 4vw, 34px); font-weight: 900; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.detail-head p { font-size: 15px; opacity: .95; margin-top: 4px; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.stat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px); padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
}
.stat-pill .ic-sm { width: 15px; height: 15px; }

/* ===== Tabbar ===== */
.tabbar-wrap { position: sticky; top: 64px; z-index: 30; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.tabbar { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 16px 16px; font-weight: 800; font-size: 14.5px; color: var(--text-2);
  white-space: nowrap; transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--p); }
.tab.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--p); }

/* content top spacing */
#tabContent { padding-top: 24px; min-height: 40vh; }

/* ===== Info blocks ===== */
.block-title { font-size: 16px; font-weight: 900; color: var(--p); margin-bottom: 10px; }
.info-block + .info-block, .card.pad + .card.pad { margin-top: 16px; }
.info-block p { color: var(--text); font-size: 15px; line-height: 1.7; }
.contact-list { display: flex; flex-direction: column; gap: 4px; }
.contact-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; font-weight: 600; transition: background .15s; }
.contact-row:hover { background: var(--p-surface); }
.contact-row .ic-sm { width: 18px; height: 18px; color: var(--p); }

/* ===== Announcement ===== */
.ann-card { margin-bottom: 16px; }
.ann-img { height: 200px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 7px; margin-bottom: 8px; }
.tag-pin { background: var(--gold); color: #1E1B4B; }
.ann-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.ann-body { color: var(--text-2); font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }
.ann-foot { margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--hint); }

/* ===== Event ===== */
.event-card { display: flex; gap: 16px; padding: 16px; margin-bottom: 14px; align-items: flex-start; }
.event-date { flex: none; width: 60px; height: 64px; border-radius: 14px; background: var(--p-surface); color: var(--p); display: grid; place-items: center; align-content: center; }
.event-date .d { font-size: 24px; font-weight: 900; line-height: 1; }
.event-date .m { font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.event-body h3 { font-size: 17px; font-weight: 800; }
.event-meta { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.event-meta span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.event-meta .ic-sm { width: 14px; height: 14px; color: var(--p); }
.event-desc { color: var(--text-2); font-size: 14px; line-height: 1.55; }

/* ===== Campaign ===== */
.campaign-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.campaign-top { display: flex; align-items: center; gap: 12px; }
.brand-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--p-surface); display: grid; place-items: center; overflow: hidden; flex: none; }
.brand-ic img { width: 100%; height: 100%; object-fit: cover; }
.brand-ic .ic-sm { width: 22px; height: 22px; color: var(--p); }
.campaign-info { flex: 1; min-width: 0; }
.campaign-info .brand-name { font-size: 12px; font-weight: 700; color: var(--text-2); }
.campaign-info h3 { font-size: 15px; font-weight: 800; }
.discount { background: var(--p-grad); color: #fff; font-weight: 900; font-size: 16px; padding: 8px 12px; border-radius: 12px; flex: none; }
.campaign-desc { color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.campaign-foot { display: flex; align-items: center; justify-content: space-between; }
.promo { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--p); font-size: 13px; letter-spacing: .5px; background: var(--p-surface); padding: 6px 10px; border-radius: 9px; }
.days { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.days.soon { color: var(--gold); }
.promo .ic-sm, .days .ic-sm { width: 14px; height: 14px; }

/* ===== Community ===== */
.community-card { padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
.community-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.community-ic .ic-sm { width: 24px; height: 24px; }
.community-card h3 { font-size: 16px; font-weight: 800; }
.community-card p { color: var(--text-2); font-size: 13.5px; margin: 3px 0 8px; }
.community-count { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--p); }
.community-count .ic-sm { width: 14px; height: 14px; }

/* ===== Gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding-bottom: 24px; }
.gallery-cell { aspect-ratio: 1; border-radius: 14px; transition: transform .16s, box-shadow .2s; box-shadow: var(--shadow); }
.gallery-cell:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }

/* ===== Logo overlay (büyüt/küçült) ===== */
.logo-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: rgba(0,0,0,.82); opacity: 0; transition: opacity .22s; cursor: zoom-out; padding: 20px; text-align: center;
}
.logo-overlay.show { opacity: 1; }
.logo-zoom { width: 240px; height: 240px; max-width: 80vw; max-height: 60vh; border-radius: 28px; background: #fff; padding: 12px; box-shadow: 0 20px 60px rgba(99,102,241,.5); display: grid; place-items: center; overflow: hidden; transform: scale(.6); transition: transform .3s cubic-bezier(.2,1.3,.5,1); }
.logo-overlay.show .logo-zoom { transform: scale(1); }
.logo-zoom img { width: 100%; height: 100%; object-fit: contain; border-radius: 18px; }
.logo-zoom span { font-size: 90px; font-weight: 900; color: var(--p); }
.logo-overlay p { color: #fff; font-weight: 800; font-size: 16px; }
.logo-overlay small { color: rgba(255,255,255,.7); }

/* ===== Auth ===== */
.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px 28px; text-align: center; }
.auth-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--p-grad); color: #fff; font-weight: 900; font-size: 20px; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 8px 22px rgba(67,56,202,.35); }
.auth-card h2 { font-size: 24px; font-weight: 900; }
.auth-card form { text-align: left; margin-top: 22px; }
.auth-card label { display: block; font-size: 13px; font-weight: 800; color: var(--text-2); margin: 12px 0 6px; }
.auth-card input { width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; font-family: inherit; font-size: 15px; background: var(--surface); outline: none; transition: border .15s, background .15s; }
.auth-card input:focus { border-color: var(--p); background: #fff; }
.auth-foot { margin-top: 18px; font-size: 13px; }

/* ===== Empty / skeleton ===== */
.empty { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty-ic { font-size: 44px; margin-bottom: 12px; }
.empty p { font-weight: 600; }
.shimmer { position: relative; overflow: hidden; background: #eef0f3; }
.shimmer::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skel-card { height: 220px; border-radius: var(--radius); }
.detail-skel { height: 200px; border-radius: var(--radius); margin: 20px 0; }

/* ===== Toast ===== */
.ds-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 200;
  background: #111827; color: #fff; font-weight: 700; font-size: 14px; padding: 13px 20px; border-radius: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 90vw;
}
.ds-toast.show { opacity: 1; transform: translate(-50%, 0); }
.ds-toast.success { background: #059669; }
.ds-toast.error { background: var(--coral); }

/* ===== Footer ===== */
.site-footer { margin-top: 60px; padding: 36px 0; border-top: 1px solid var(--border); background: #fff; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 17px; }
.site-footer p { color: var(--text-2); margin: 8px 0; }
.site-footer small { color: var(--hint); }

/* ===== Animations ===== */
.card, .stat-pill, .ann-card, .event-card { animation: fadeup .4s both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .bar { height: 58px; }
  #tabContent, .tabbar-wrap { }
  .tabbar-wrap { top: 58px; }
  .detail-hero-inner { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 70px; }
  .detail-logo { width: 76px; height: 76px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 36px; }
}
