:root {
  --navy: #191d4c;      /* logodaki kurumsal renk */
  --navy-2: #2a3070;
  --navy-deep: #10132f;
  --accent: #a6d12f;     /* detay rengi: lacivert zeminde ikon, çizgi, vurgu */
  --accent-ink: #557209; /* açık zeminde okunabilir koyu tonu (yazılar için) */
  --bg: #f5f2ec;
  --surface: #ffffff;
  --tint: #ecedf5;
  --text: #1b2430;
  --muted: #5d6876;
  --line: #ebe5da;
  --wa: #128c4b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(25, 29, 76, .06), 0 6px 20px rgba(25, 29, 76, .07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 560px; min-height: 100dvh; margin: 0 auto; }
a { color: inherit; }
h1, h2, p { margin: 0; }
h1:focus { outline: none; }

.i {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
[dir="rtl"] .flip { transform: scaleX(-1); }

.view { animation: view-in .22s ease-out backwards; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

/* Resmi logo (beyaz sürüm, lacivert zemin üzerinde) */
.logo { display: block; height: auto; margin: 0 auto; }
.lang-screen .logo { width: 210px; }
.home-head .logo { width: 170px; }

/* ---------- Dil seçimi ---------- */
.lang-screen {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: calc(56px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom));
  color: #fff; text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(166, 209, 47, .14), transparent 60%),
    linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 55%, var(--navy-deep) 100%);
  /* Otel fotoğrafı hazır olunca: */
  /* background-image: linear-gradient(180deg, rgba(13,42,71,.55), rgba(8,27,47,.95)), image-set(url(images/hero-1200.webp) type("image/webp")); background-size: cover; background-position: center; */
}
/* Karşılama yazısı üç dil arasında sırayla döner (her dil 3 sn) */
.greet { display: grid; font-weight: 500; }
.greet-item {
  grid-area: 1 / 1; display: grid; gap: 14px;
  animation: greet-cycle 9s ease-in-out infinite both;
}
.greet-item:nth-child(2) { animation-delay: 3s; }
.greet-item:nth-child(3) { animation-delay: 6s; }
.greet-title { font-family: var(--serif); font-size: 36px; line-height: 1.2; }
.greet [lang="ar"] .greet-title { font-family: var(--font); font-size: 34px; }
.hint { font-family: var(--font); font-size: 14px; font-weight: 400; opacity: .65; }

@keyframes greet-cycle {
  0%      { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  5%, 28% { opacity: 1; transform: none; filter: none; }
  33.3%   { opacity: 0; transform: translateY(-14px); filter: blur(4px); }
  100%    { opacity: 0; transform: translateY(-14px); }
}
/* Hareket azaltma açıksa üç dil alt alta, sabit */
@media (prefers-reduced-motion: reduce) {
  .greet { gap: 18px; }
  .greet-item { grid-area: auto; animation: none; }
}
.lang-list { display: grid; gap: 12px; text-align: start; }
.lang-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 68px; padding: 14px 20px; border-radius: 14px;
  color: #fff; text-decoration: none; font-size: 19px; font-weight: 600;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18);
  transition: background-color .15s, transform .1s;
}
.lang-btn small { display: block; font-size: 13px; font-weight: 400; opacity: .65; }
.lang-btn:active { transform: scale(.98); background: rgba(255, 255, 255, .15); }
.lang-btn.is-current { border-color: var(--accent); }
.lang-btn .i { color: var(--accent); }

/* ---------- Ana sayfa ---------- */
.demo {
  padding: 6px 16px; text-align: center; font-size: 12px; font-weight: 600;
  color: #6b4a12; background: #f6e7c8;
}
.home-head {
  padding: calc(16px + env(safe-area-inset-top)) 20px 28px;
  color: #fff; text-align: center; border-radius: 0 0 28px 28px;
  background: linear-gradient(160deg, var(--navy-2), var(--navy) 70%);
}
.home-bar { position: relative; padding-top: 8px; margin-bottom: 24px; }
.home-bar .lang-pill { position: absolute; top: 0; inset-inline-end: 0; }
.home-head h1::after {
  content: ""; display: block; width: 36px; height: 3px; margin: 12px auto 0;
  border-radius: 2px; background: var(--accent);
}
.home-head h1 { margin-top: 6px; font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; }
.lead { margin-top: 8px; font-size: 15px; opacity: .8; }

.lang-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none;
  background: rgba(255, 255, 255, .12); color: inherit;
}
.lang-pill .i { width: 18px; height: 18px; }

.tiles {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  padding: 20px 16px calc(100px + env(safe-area-inset-bottom));
}
@media (min-width: 420px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
/* Referans rehberdeki gibi: dolu renkli kare kutu, ortada beyaz ikon ve altında yazı */
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  aspect-ratio: 1; padding: 12px; border-radius: 6px;
  color: #fff; background: var(--navy);
  box-shadow: 0 2px 6px rgba(25, 29, 76, .18);
  text-align: center; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.2;
  transition: transform .1s, background-color .15s;
}
.tile:active { transform: scale(.97); background: var(--navy-deep); box-shadow: inset 0 -3px 0 var(--accent); }
.tile .ico .i { width: 40px; height: 40px; stroke-width: 1.4; }
.tile .ico img { display: block; width: auto; height: 40px; }

.dock {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 5;
  display: flex; gap: 10px; max-width: 560px; margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(245, 242, 236, 0), var(--bg) 35%);
}
.dock .btn { flex: 1; justify-content: center; min-height: 52px; }

/* ---------- Alt sayfalar ---------- */
.page-bar {
  border-bottom: 3px solid var(--accent);
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  color: #fff; background: var(--navy);
}
.page-bar h1 { flex: 1; font-size: 18px; font-weight: 600; text-align: center; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  color: inherit; text-decoration: none; background: none; border: 0; cursor: pointer;
}
.icon-btn:active { background: rgba(255, 255, 255, .12); }
.page-bar .lang-pill { padding: 0 10px; }
.intro { padding: 20px 20px 4px; color: var(--muted); font-size: 15px; }
.cards { display: grid; gap: 14px; padding: 14px 16px calc(32px + env(safe-area-inset-bottom)); }

.card { overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  background: #e9e4da;
}
.card-body { padding: 18px; }
.card h2 { padding-inline-start: 10px; border-inline-start: 3px solid var(--accent); font-size: 17px; font-weight: 700; line-height: 1.3; }
.card .sub { margin-top: 2px; padding-inline-start: 13px; color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.card .text { margin-top: 8px; color: #384352; font-size: 15px; }
.card .text p + p { margin-top: 8px; }

/* Madde listesi (yangın güvenliği, süit donanımı vb.) */
.list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; color: #384352; }
.list li { position: relative; padding-inline-start: 18px; }
.list li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
/* Numaralı kanal listesi (TV rehberi) */
.channels { margin: 8px 0 0; padding: 0; list-style: none; font-size: 15px; }
.channels li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--line); font-weight: 600;
}
.channels li:first-child { border-top: 0; }
.ch-no { flex: none; min-width: 26px; text-align: end; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
@media (min-width: 480px) {
  .channels { columns: 2; column-gap: 24px; }
  .channels li { break-inside: avoid; }
}
.rows { margin: 12px 0 0; }
.rows div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px;
}
.rows div:first-child { border-top: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; font-weight: 600; text-align: end; }

/* Butonlar her zaman tek satırda, eşit genişlikte yan yana */
.actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 16px; }
.actions .btn { justify-content: center; min-width: 0; padding-inline: 12px; }
.actions .btn span { overflow: hidden; text-overflow: ellipsis; }
/* 3+ buton: ikon üstte, yazı altta (dar ekrana sığsın) */
.actions.compact .btn {
  flex-direction: column; gap: 4px; min-height: 60px; padding: 8px 4px; border-radius: 14px;
  font-size: 12px; line-height: 1.2; white-space: normal; text-align: center;
}
.actions.compact .btn span { overflow: visible; }
.actions.compact .btn .i { width: 20px; height: 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  color: #fff; background: var(--navy);
  transition: transform .1s;
}
.btn:active { transform: scale(.97); }
.btn .i { width: 18px; height: 18px; }
.btn.secondary { color: var(--navy); background: var(--tint); }
.btn.wa { background: var(--wa); }

.error { padding: 48px 24px; text-align: center; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 10;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: #fff; background: rgba(25, 29, 76, .95);
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
