:root {
  --bg: #f4f8f5;
  --card: #ffffff;
  --text: #1f3428;
  --accent: #2e8b57;
  --accent-dark: #1f6a40;
  --muted: #5d6f66;
  --line: #dce8df;
  --shadow: 0 14px 36px rgba(19, 58, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(circle at 0 0, #eff8f1 0%, #f7fbf8 45%, #f9fcfa 100%);
  color: var(--text);
  line-height: 1.65;
}

.navbar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: linear-gradient(90deg, #143a24, #1d5734);
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.navbar a {
  color: #eef9f1;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  transition: background 180ms ease, transform 180ms ease;
}

.navbar a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.site-logo-link {
  display: inline-block;
  line-height: 0;
}

.site-logo-link:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.55);
  outline-offset: 4px;
  border-radius: 12px;
}

.hero-logo {
  text-align: center;
  margin: 0 0 1.1rem;
}

/* Height set by index.jsp script to match h1 text width; width follows aspect ratio */
.hero-logo .site-logo {
  display: block;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
  height: 3.5rem;
}

.hero {
  padding: 4.6rem 1.2rem 3rem;
  text-align: center;
  background: radial-gradient(circle at 20% 10%, #46b568 0%, #2f8d50 38%, #1b5a37 100%);
  color: #f9fff9;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}

.hero:has(.hero-logo) {
  padding-top: 2.6rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  letter-spacing: 0.4px;
  display: inline-block;
  width: max-content;
  max-width: 100%;
}

.hero p {
  max-width: 860px;
  margin: 1rem auto 0;
  line-height: 1.72;
  font-size: 1.04rem;
}

.hero a {
  color: #e8ffef;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.container {
  max-width: 1140px;
  margin: 2.1rem auto;
  padding: 0 1.05rem;
}

/* Gallery pages: beat plain .container so auto-fit gallery is not stuck at ~1100px (= 2×500px tracks) */
.container.container--gallery {
  max-width: 2200px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 1.45rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 1.6rem;
}

.card h2 {
  margin-top: 0.1rem;
  margin-bottom: 0.65rem;
  font-size: 1.4rem;
}

.card p {
  margin: 0.4rem 0 0.85rem;
  max-width: 72ch;
}

.card a {
  color: var(--accent-dark);
  font-weight: 700;
}

.alert-success,
.alert-error {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.alert-success {
  background: #ddf7e3;
  color: #1b6230;
}

.alert-error {
  background: #ffe8e8;
  color: #7a2121;
}

.alert-neutral {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 600;
  background: #eef1f4;
  color: #3d4a55;
}

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

label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0.74rem 0.78rem;
  border-radius: 12px;
  border: 1px solid #c9d8cd;
  font-size: 1rem;
  background: #fbfefb;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: #7ab990;
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.16);
}

button {
  margin-top: 1rem;
  background: linear-gradient(135deg, var(--accent), #277d4b);
  color: white;
  border: none;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 18px rgba(36, 111, 62, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  background: linear-gradient(135deg, var(--accent-dark), #195a35);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(28, 91, 50, 0.33);
}

.home-form-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.home-form-actions button,
.home-form-actions a.button-link {
  margin-top: 1rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
  gap: 2rem;
}

/* Three-column gallery (Ekibimiz, Bahçe Tasarımları) — not .gallery (auto-fit 500px → 2 cols @ ~1100px) */
.ekibimiz-gallery,
.designs-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

@media (max-width: 480px) {
  .navbar {
    padding: 0.82rem 0.72rem;
  }

  .container {
    margin: 1.3rem auto;
    padding: 0 0.72rem;
  }

  .hero {
    padding: 3.2rem 0.85rem 2.2rem;
  }

  .hero:has(.hero-logo) {
    padding-top: 1.85rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .ekibimiz-gallery,
  .designs-gallery {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .card {
    border-radius: 16px;
    padding: 1.05rem;
  }

  .card p,
  .gallery-item .caption,
  ul.refs {
    font-size: 0.95rem;
  }
}

.gallery-item {
  background: var(--card);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid #e2ece4;
  box-shadow: 0 10px 26px rgba(15, 51, 25, 0.13);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(15, 51, 25, 0.16);
}

.gallery-item img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.gallery-item video {
  width: 100%;
  height: 360px;
  object-fit: cover;
  background: #000;
}

.gallery-item.rasit-box {
  border: 2px solid rgba(47, 143, 70, 0.35);
}

/* Second Raşit photo: nudge crop so head stays in frame under object-fit: cover */
.gallery-item.rasit-box img.rasit-img-second {
  object-position: center 28%;
}

.gallery-item .caption {
  padding: 1.25rem 1.35rem 1.45rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.65;
  max-width: 62ch;
}

ul.refs {
  line-height: 1.8;
  padding-left: 1.2rem;
}

@media (max-width: 920px) {
  .container {
    margin: 1.6rem auto;
    padding: 0 0.9rem;
  }

  .hero {
    padding: 3.8rem 1rem 2.5rem;
  }

  .hero:has(.hero-logo) {
    padding-top: 2.15rem;
  }

  .hero p {
    max-width: 62ch;
    font-size: 1rem;
  }

  .card {
    padding: 1.2rem;
  }

  .card h2 {
    font-size: 1.25rem;
  }
}

/* --- Customer reviews (references + admin) --- */
.required-label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
}

.star-field {
  grid-column: 1 / -1;
}

.star-picker {
  display: inline-flex;
  flex-direction: row;
  gap: 0.22rem;
  margin: 0.2rem 0 0.15rem;
}

.star-btn {
  margin: 0;
  padding: 0.15rem 0.28rem;
  min-height: unset;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 2.05rem;
  line-height: 1;
  color: #c9d4cc;
  box-shadow: none;
  transition: color 140ms ease, transform 140ms ease;
}

.star-btn:hover,
.star-btn:focus-visible {
  transform: scale(1.06);
  color: #e6a800;
}

.star-btn.lit {
  color: #e6a800;
}

.star-btn:focus-visible {
  outline: 2px solid rgba(46, 139, 87, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

.star-picker-hint {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.review-intro {
  margin-top: 0;
  color: var(--muted);
  max-width: 70ch;
}

.review-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.review-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
  background: #fbfffc;
}

.review-item:last-child {
  margin-bottom: 0;
}

.review-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.review-item__meta {
  font-size: 0.96rem;
}

.review-item__date {
  color: var(--muted);
  font-weight: 500;
}

.review-item__body {
  margin: 0;
  line-height: 1.7;
  color: var(--text);
}

.rating-stars {
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-size: 1.15rem;
}

.rating-stars--sm {
  font-size: 1rem;
}

.rating-stars .on {
  color: #e6a800;
}

.rating-stars .off {
  color: #dde5df;
}

.review-item__reply {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border-left: 4px solid var(--accent);
  background: #f0f7f2;
}

.review-item__reply-label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  margin-bottom: 0.35rem;
}

.review-item__reply-body {
  margin: 0;
  line-height: 1.65;
}

.review-item__reply-foot {
  margin-top: 0.45rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.review-pager {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.review-pager__meta {
  color: var(--muted);
  font-weight: 600;
}

.review-pager__link {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 700;
  background: #f5faf7;
}

.review-pager__link:hover {
  background: #eaf5ee;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  min-height: unset;
  margin-top: 0.35rem;
}

.checkbox-row label {
  margin: 0;
  font-weight: 500;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.74rem 0.78rem;
  border-radius: 12px;
  border: 1px solid #c9d8cd;
  font-size: 1rem;
  background: #fbfefb;
  font-family: inherit;
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea:focus {
  outline: none;
  border-color: #7ab990;
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.16);
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.g-recaptcha {
  margin: 0.75rem 0 0.35rem;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-toolbar__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-toolbar__actions form {
  margin: 0;
}

a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #277d4b);
  color: #fff;
  text-decoration: none;
  border: none;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 18px rgba(36, 111, 62, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

a.button-link:hover {
  background: linear-gradient(135deg, var(--accent-dark), #195a35);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(28, 91, 50, 0.33);
}

.home-form-actions a.button-link {
  background: linear-gradient(135deg, #d4a017, #b8860b);
  color: #fff;
}

.home-form-actions a.button-link:hover {
  background: linear-gradient(135deg, #b8860b, #9a7209);
}

.admin-review-card .admin-review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.admin-review-meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.admin-review-names {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.admin-review-body {
  margin: 0 0 0.85rem;
  line-height: 1.65;
}

.admin-review-tech {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.admin-review-existing-reply {
  margin-bottom: 1rem;
}

.admin-review-reply-form {
  margin-bottom: 1rem;
}

.admin-review-reply-form textarea {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

button.button-secondary {
  background: linear-gradient(135deg, #5a7a66, #46604f);
  box-shadow: 0 6px 14px rgba(40, 74, 54, 0.22);
}

button.button-secondary:hover {
  background: linear-gradient(135deg, #46604f, #354a3c);
}

button.button-danger {
  background: linear-gradient(135deg, #b23b3b, #8f2d2d);
  box-shadow: 0 6px 14px rgba(120, 38, 38, 0.25);
}

button.button-danger:hover {
  background: linear-gradient(135deg, #962f2f, #6f2222);
}

button.button-danger-outline {
  background: transparent;
  color: #8f2d2d;
  border: 2px solid rgba(143, 45, 45, 0.45);
  box-shadow: none;
}

button.button-danger-outline:hover {
  background: #fff5f5;
  color: #6f2222;
}

.admin-review-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
}

.admin-review-actions__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-review-approve-form {
  width: 100%;
}

.admin-review-actions button {
  margin-top: 0;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.badge--ok {
  background: #d6f5de;
  color: #1b6230;
}

.badge--pending {
  background: #fff4d6;
  color: #7a5b10;
}

.badge--no {
  background: #ffe0e0;
  color: #7a2121;
}

.discount-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.7rem;
}

.discount-table th,
.discount-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #edf3ef;
  text-align: left;
}

.discount-table th {
  background: #f3f8f4;
}

.discount-banner-toggle {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.85rem;
  font-weight: 600;
}

.discount-banner-toggle input[type="checkbox"] {
  width: auto;
  min-height: unset;
}

.discount-banner {
  border: 1px solid #d2ead9;
  background: linear-gradient(135deg, #effaf3 0%, #f7fcf8 100%);
}

.discount-banner h2 {
  margin-bottom: 0.85rem;
}

.discount-banner__items {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.discount-banner__note {
  margin: 0.2rem 0 1rem;
  color: var(--muted);
  max-width: 80ch;
  font-weight: 600;
}

.discount-banner__item {
  background: #fff;
  border: 1px solid #e1eee5;
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.discount-banner__category {
  font-weight: 600;
}

.discount-banner__percent {
  color: var(--accent-dark);
  font-size: 1.05rem;
}

@media (max-width: 700px) {
  .navbar {
    justify-content: flex-start;
    gap: 0.55rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .navbar a {
    white-space: nowrap;
    padding: 0.66rem 1.02rem;
    font-size: 0.95rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    line-height: 1.68;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  button {
    width: 100%;
  }

  .gallery-item img,
  .gallery-item video {
    height: 260px;
  }

  /* Mobile card layout for admin media tables */
  .admin-media-table {
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
  }

  .admin-media-table thead {
    display: none;
  }

  .admin-media-table tbody,
  .admin-media-table tr,
  .admin-media-table td {
    display: block;
    width: 100%;
  }

  .admin-media-table tr {
    border: 1px solid #e5ede8;
    border-radius: 14px;
    margin-bottom: 0.9rem;
    background: #fbfffc;
    overflow: hidden;
  }

  .admin-media-table td {
    border-bottom: 1px solid #edf3ef !important;
    padding: 0.65rem 0.75rem !important;
  }

  .admin-media-table td:last-child {
    border-bottom: none !important;
  }

  .admin-media-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #5d6f66;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .admin-media-table textarea,
  .admin-media-table input[type="text"],
  .admin-media-table input[type="number"] {
    width: 100%;
    max-width: 100% !important;
  }

  .admin-media-table form button {
    width: 100%;
  }
}
