:root {
  /* Logo ile uyumlu tonlar */
  --green: #014027;        /* ana koyu yeşil */
  --green-dark: #012417;   /* panel koyu yeşil */
  --gold: #d9b15c;         /* altın sarısı */
  --gold-soft: #f3e3ba;    /* açık altın */
  --red: #c0392b;          /* hata/danger */
  --light: #f7f7f7;
  --text: #222;
}

/* RESET & BASE */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1; /* kısa sayfada footer'ı aşağı iter */
}

/* UTILS */

.btn {
  border-radius: 999px;
  padding: 8px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: filter 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--gold);
  color: var(--green);
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--green);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--green-dark);
}

.btn-outline {
  border-color: #fff;
  background: transparent;
  color: #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--green);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-small {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
}

/* Mobil davranış için varsayılan */
.btn-sm-hidden {
  display: inline-flex;
}
.btn-sm-full {
  display: inline-flex;
}

/* TOPBAR */

.topbar {
  background: var(--green);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-img {
  height: 35px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-name {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 15px;
  white-space: nowrap;
}

.logo-sub {
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* HAMBURGER BUTTON */

.nav-toggle {
  display: none; /* desktopta gizle */
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* NAV LINKS */

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--gold);
}

.inline-form {
  display: inline;
  margin: 0;
}

.btn-logout {
  padding-inline: 12px;
}

/* HERO */

.hero {
  background: linear-gradient(135deg, var(--green), #013522);
  color: #fff;
  padding: 72px 16px 96px;
  text-align: center;
}

.hero-center {
  max-width: 820px;
  margin: 0 auto;
}

.hero-logo {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  margin: 0 auto 20px;
}

.hero h1 {
  font-size: 26px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.92;
}

.hero-underline {
  width: 80px;
  height: 3px;
  background: var(--gold);
  margin: 10px auto 20px;
}

/* SECTIONS */

.section {
  padding: 40px 16px;
}

.section-alt {
  background: #ffffff;
}

.section-title {
  text-align: center;
  margin: 0;
  font-size: 20px;
}

.section-underline {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 14px auto 26px;
}

.section > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* SERVICES */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.service-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 16px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card h3 {
  margin: 0 0 6px;
}

/* ARTICLES */

.articles-list {
  display: grid;
  gap: 16px;
}

.article-card {
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-header h3 {
  margin: 0 0 5px 0;
}

.article-header h3 a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.article-header h3 a:hover {
  color: var(--gold);
}

.article-date {
  font-size: 12px;
  color: #777;
  display: block;
  margin-bottom: 8px;
}

.article-preview p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

.article-footer {
  margin-top: 10px;
}

/* --- Detay Sayfası / Formatter Kısmı --- */

.article-detail-page .container {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.article-head .big-title {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--green);
  text-align: center;
}

.article-meta-info {
  text-align: center;
  color: #888;
  font-size: 13px;
  margin-bottom: 20px;
}

/* Admin panelinden gelen içeriği formatlayan sınıf */
.article-content-body {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  white-space: pre-wrap; 
  word-wrap: break-word;
  margin-top: 20px;
  margin-bottom: 40px;
}

/* İçerik içindeki etiket stilleri */
.article-content-body h2 {
  color: var(--green);
  margin-top: 25px;
}
.article-content-body strong {
  font-weight: 700;
  color: #000;
}
.article-content-body ul {
  margin-left: 20px;
}

/* GENEL FORM KARTI */

.form-card {
  max-width: 500px;
  margin: 0 auto;
  padding: 18px 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 12px;
}

.form-card label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.form-card input,
.form-card textarea,
.form-card select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font: inherit;
  width: 100%;
}

.form-card input:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--gold);
}

/* ADMIN TABLE */

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto; /* Mobilde tablo taşarsa kaydırır */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Mobilde çok sıkışmaması için */
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  text-align: left;
}

.admin-table th {
  background: #fafafa;
  font-weight: 600;
  color: var(--green);
}

.td-title strong {
  font-size: 15px;
  color: var(--text);
}

.actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* FOOTER */

.site-footer {
  background: var(--green);
  color: #fff;
  margin-top: auto;
  padding: 50px 20px 20px;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  text-align: center;
}

.footer-title {
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin: 8px 0;
}

.footer-menu a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}

.footer-menu a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 30px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 15px;
  font-size: 13px;
  opacity: 0.8;
}

/* MISC */

.success {
  color: #27ae60;
  text-align: center;
  margin-bottom: 16px;
  background: #e8f8f1;
  padding: 10px;
  border-radius: 8px;
}

.error {
  color: var(--red);
  text-align: center;
  margin-bottom: 16px;
  background: #fdecea;
  padding: 10px;
  border-radius: 8px;
}

/* CONTACT PAGE */

.contact-hero {
  background: linear-gradient(135deg, var(--green), #013522);
  color: #fff;
  padding: 40px 16px 28px;
  text-align: center;
}

.contact-hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.contact-hero-inner h1 {
  margin-bottom: 8px;
  font-size: 22px;
}

.contact-hero-inner p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

.contact-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  align-items: flex-start;
}

.contact-form-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  padding: 20px 18px;
}

.contact-info-card {
  background: var(--green-dark);
  color: #fff;
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(217, 177, 92, 0.4);
}

.contact-title {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 18px;
}

.contact-subtitle {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 13px;
  color: #555;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-group {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.contact-form input,
.contact-form textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font: inherit;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(217, 177, 92, 0.9);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-transform: uppercase;
  color: var(--gold);
}

.contact-info-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.info-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.info-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(217, 177, 92, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--gold);
}

.info-label {
  font-size: 11px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-value {
  font-size: 13px;
}

.contact-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 14px 0 10px;
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}

.alert-success {
  background: #e8f8f1;
  color: #1e874b;
  border: 1px solid #b8e6cc;
}

.alert-error {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5b7b1;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-info-card {
    order: -1;
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: row;
    align-items: center;
  }

  .logo-area {
    flex: 1;
  }

  .nav-toggle {
    display: flex; /* mobilde göster */
  }

  /* Menü başlangıçta gizli */
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 56px; /* topbar yüksekliğine göre */
    background: var(--green);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px 12px;
    gap: 10px;
    display: none;
  }

  /* Açıkken */
  .nav-links.nav-open {
    display: flex;
  }

  .nav-links a,
  .nav-links .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links .btn-sm-full {
    justify-content: center;
  }

  .btn-sm-hidden {
    display: none;
  }

  .hero {
    padding: 48px 16px 64px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero-logo {
    width: 90px;
    height: 90px;
    font-size: 48px;
  }

  .section {
    padding: 32px 16px;
  }
}

@media (max-width: 480px) {
  .logo-name {
    font-size: 13px;
    letter-spacing: 1.5px;
  }

  .logo-sub {
    font-size: 10px;
  }

  .hero h1 {
    font-size: 20px;
  }

  .hero p {
    font-size: 14px;
  }

  .service-card {
    padding: 16px 14px;
  }
}
