/* ============================================
   DIWANET - main.css
   Tüm sayfalar tarafından kullanılan ortak stiller
   ============================================ */

/* CSS Variables */
:root {
  --bg: #F5F7FA;
  --surface: #ffffff;
  --surface2: #EBF2FA;
  --border: #D6E4F0;
  --text: #1E2A3E;
  --muted: #5A6A7E;
  --muted2: #8A9BB0;
  --accent: #0F4C81;
  --accent-dark: #0A3660;
  --accent-light: #E8F2FC;
  --danger: #DC2626;
  --danger-light: #FEF2F2;
  --success: #16A34A;
  --success-light: #F0FDF4;
  --shadow: 0 2px 12px rgba(15,76,129,0.07);
  --shadow-lg: 0 8px 32px rgba(15,76,129,0.12);
  --radius: 20px;
  --radius-sm: 12px;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
.mention-link { color: var(--accent) !important; font-weight: 700 !important; text-decoration: none !important; }
.mention-link:hover { text-decoration: underline !important; }
img { max-width: 100%; display: block; }

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(15,76,129,0.06);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-family: 'DM Serif Display', serif;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

/* Brand logo image - topbar & footer */
.brand-logo {
  height: 105px;
  width: auto;
  display: block;
  object-fit: contain;
  margin-left: 40px;
}

@media (max-width: 768px) {
  .brand-logo {
    height: 80px;
    margin-left: 0;
  }
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
}
.topbar-nav a:hover { color: var(--accent); background: var(--accent-light); }
.topbar-nav a.active { color: var(--accent); font-weight: 700; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: 66px;
  background: white;
  z-index: 99;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  text-align: center;
}
.mobile-menu a.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #B91C1C; }

.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 13px 32px; font-size: 0.95rem; }
.btn-full { width: 100%; }

/* ============================================
   FORMS
   ============================================ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field.full { grid-column: 1 / -1; }

label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
label .optional {
  font-weight: 400;
  text-transform: none;
  color: var(--muted2);
  font-size: 0.78rem;
  letter-spacing: 0;
}

input, select, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, background 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}
input::placeholder, textarea::placeholder { color: var(--muted2); }
textarea { min-height: 110px; resize: vertical; }

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

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 24px; }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-header h2 { font-size: 1rem; font-weight: 700; margin: 0; }
.card-header p { font-size: 0.82rem; color: var(--muted); margin: 2px 0 0; }
.card-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 0 0 var(--radius) var(--radius);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   MESSAGES / ALERTS
   ============================================ */
.msg {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  display: none;
}
.msg.error {
  display: block;
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #FECACA;
}
.msg.success {
  display: block;
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #BBF7D0;
}
.msg.info {
  display: block;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(15,76,129,0.2);
}

/* ============================================
   TAGS / BADGES
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid rgba(15,76,129,0.15);
}
.tag.grey {
  background: var(--surface2);
  color: var(--muted);
  border-color: var(--border);
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-md { width: 42px; height: 42px; font-size: 1rem; }
.avatar-lg { width: 68px; height: 68px; font-size: 1.5rem; }
.avatar-xl { width: 86px; height: 86px; font-size: 1.8rem; }

.biz-avatar {
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  flex-shrink: 0;
  overflow: hidden;
}
.biz-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.biz-avatar-sm { width: 36px; height: 36px; font-size: 0.88rem; border-radius: 10px; }
.biz-avatar-md { width: 48px; height: 48px; font-size: 1.1rem; border-radius: 13px; }
.biz-avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; border-radius: 18px; }

/* ============================================
   LOADING / EMPTY STATES
   ============================================ */
.loading {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted2);
  font-size: 0.92rem;
}
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted2);
}
.empty-state h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p { font-size: 0.88rem; }

.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, #dceaf5 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted2);
  font-size: 0.82rem;
  margin: 20px 0;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================
   CONTAINER
   ============================================ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 480px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   SECTION
   ============================================ */
.section { padding: 48px 0; }
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.section-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 520px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .topbar-nav { display: none; }
  .topbar-actions { display: none; }
  .hamburger { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .container, .container-sm, .container-xs { padding: 0 16px; }
  .section { padding: 32px 0; }
}