/* theme.css - Modern & Premium Barkod Teması */

/* 1. DEĞİŞKENLER VE RENK PALETİ */
:root {
  /* Index.html ile uyumlu ana palet */
  --bg: #f4f4f6;
  --card: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #667eea;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --secondary: #1e293b;
  --border: #e5e7eb;

  /* Theme.css içindeki eski değişkenler için tam uyumluluk */
  --bg-body: var(--bg);
  --bg-card: var(--card);
  --bg-input: #f1f5f9;
  /* Index doesn't define this inline but useful */

  --text-main: var(--text);
  --text-muted: var(--muted);
  --text-light: #ffffff;

  --gradient-start: #667eea;
  /* Primary */
  --gradient-end: #764ba2;
  /* Secondary/Accent matching index gradient */

  --primary-hover: #5063b8;
  /* Matching index hover */

  --radius: 16px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);

  --nav-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #1e293b;
}

.dark {
  --bg: #0b1220;
  --card: #1a2332;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #374151;

  /* Uyumluluk */
  --bg-body: var(--bg);
  --bg-card: var(--card);
  --bg-input: #334155;

  --text-main: var(--text);

  --primary: #818cf8;
  --primary-hover: #a580c1;
  --gradient-start: #818cf8;
  --gradient-end: #a580c1;

  --nav-bg: rgba(26, 35, 50, 0.95);
  --footer-bg: #0f172a;
}

/* 2. GENEL SIFIRLAMA */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

/* 3. MODERN NAVBAR */
.navbar {
  background-color: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  height: 70px;
  display: flex;
  align-items: center;
}

.navbar-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* Logo Alanı */
.navbar-brand {
  flex-shrink: 0;
  /* Logonun sıkışmasını engeller */
  display: flex;
  align-items: center;
}

.navbar-brand a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: none;
  -webkit-text-fill-color: initial;
}

/* SVG Logo Stilleri - DİKDÖRTGEN GÜNCELLEMESİ (SON HAL) */
.nav-logo-svg {
  height: 44px;
  /* Boyut artırıldı, daha okunaklı */
  width: auto;
  min-width: 190px;
  color: var(--text-main);
  /* İkon rengini buradan alır */
  transition: all 0.3s ease;
  display: block;
}

.navbar-brand a:hover .nav-logo-svg {
  transform: scale(1.03);
  /* Hafifçe büyür */
}

/* Navbar Linkleri */
.navbar-links {
  display: flex;
  gap: 5px;
  align-items: center;
  list-style: none;
}

.navbar-links li {
  display: flex;
  align-items: center;
}

.navbar-links a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  display: inline-block;
}

.navbar-links a:hover,
.navbar-links a.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

/* Dil Seçici */
.language-switcher {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
  display: flex;
  gap: 5px;
  align-items: center;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover,
.lang-btn.active-lang {
  background: var(--text-main);
  color: var(--bg-card);
  border-color: var(--text-main);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 3px;
  transition: 0.3s;
}

/* 4. DÜZEN VE KARTLAR */
.main-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  min-height: 80vh;
}

.hero,
.page-header {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  border-radius: 24px;
  color: white;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.3);
}

.hero::before,
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1,
.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p,
.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.card h2 {
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.card h2 i {
  color: var(--primary);
}

.grid,
.content-grid,
.contact-grid {
  display: grid;
  gap: 30px;
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.content-grid,
.contact-grid {
  grid-template-columns: 1fr 1fr;
}

/* 5. FORMLAR */
.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background-color: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* 6. BUTONLAR */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.5px;
}

.btn-primary,
.btn-success {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover,
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(79, 70, 229, 0.3);
  filter: brightness(1.1);
}

/* 7. BİLEŞENLER */
.preview-container {
  background-color: var(--bg-input);
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-top: 20px;
}

#barcodeCanvas,
#qrCodeResult canvas {
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 100%;
}

/* 8. MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-card);
  color: var(--text-main);
  width: 90%;
  max-width: 550px;
  border-radius: 24px;
  padding: 40px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.3s;
  border: 1px solid var(--border);
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  background: var(--bg-input);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.close-modal:hover {
  background: var(--danger);
  color: white;
}

/* 9. FOOTER */
footer {
  background-color: var(--footer-bg);
  color: var(--text-light);
  padding: 60px 0 30px;
  margin-top: 60px;
}

footer h3 {
  color: white;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

footer h4 {
  color: white;
  font-weight: 700;
  margin-bottom: 20px;
}

footer a {
  color: #94a3b8;
  transition: 0.2s;
}

footer a:hover {
  color: var(--primary);
  padding-left: 5px;
}

footer li {
  margin-bottom: 12px;
}

/* 10. DARK MODE TOGGLE */
.dark-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
  z-index: 1500;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-toggle:hover {
  transform: scale(1.1) rotate(15deg);
}

/* 11. MOBİL UYUMLULUK (RESPONSIVE) */
@media screen and (max-width: 1280px) {
  .hamburger {
    display: flex;
  }

  .navbar-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-card);
    flex-direction: column;
    padding: 30px 20px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links li {
    width: 100%;
    margin-bottom: 10px;
  }

  .navbar-links a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 16px;
    font-size: 1.1rem;
    background-color: var(--bg-input);
    color: var(--text-main);
    border-radius: 12px;
  }

  .navbar-links a:hover,
  .navbar-links a.active {
    background-color: var(--primary);
    color: white;
  }

  .language-switcher {
    margin: 20px 0;
    padding: 0;
    border: none;
    justify-content: flex-start;
  }

  .lang-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .hero h1,
  .page-header h1 {
    font-size: 2rem;
  }

  .content-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }

  /* Mobilde Logo Boyutu */
  .nav-logo-svg {
    height: 32px;
    min-width: 140px;
  }
}