/* EMEA Portal — styled after the Zendesk "Copenhagen" Help Center theme,
   using Zendesk Garden palette cues (kale hero, blue links, grey surfaces). */
:root {
  --hero-start: #17494d;   /* Zendesk kale */
  --hero-end: #03363d;
  --bg: #f8f9f9;
  --surface: #ffffff;
  --surface-hover: #f8f9f9;
  --border: #d8dcde;        /* Garden grey-300 */
  --text: #2f3941;          /* Garden grey-800 */
  --text-muted: #68737d;    /* Garden grey-600 */
  --link: #1f73b7;          /* Garden blue-600 */
  --link-hover: #144a75;
  --shadow: 0 1px 2px rgba(47, 57, 65, 0.08), 0 4px 14px rgba(47, 57, 65, 0.06);
  --radius: 4px;
}

[data-theme="dark"] {
  --hero-start: #0b2b2f;
  --hero-end: #041e22;
  --bg: #14171a;
  --surface: #1c2024;
  --surface-hover: #242a2e;
  --border: #333a40;
  --text: #e9ebed;
  --text-muted: #a8b0b5;
  --link: #5aa4d8;
  --link-hover: #86c0e8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* --- Top nav --- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
}

.brand-mark {
  background: var(--link);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 14px;
  letter-spacing: 0.5px;
}

.brand-sub {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
}

.theme-toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 38px;
  height: 38px;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.15s;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

/* --- Hero band --- */
.hero {
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
  padding: 64px 24px 72px;
  text-align: center;
}

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

.hero-title {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  margin: 0 0 28px;
}

.search-wrap {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
  pointer-events: none;
}

#search {
  width: 100%;
  padding: 15px 18px 15px 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 15px;
  outline: none;
  box-shadow: 0 6px 20px rgba(3, 54, 61, 0.25);
}

#search:focus {
  box-shadow: 0 0 0 3px rgba(31, 115, 183, 0.35), 0 6px 20px rgba(3, 54, 61, 0.25);
}

/* --- Content --- */
.content {
  flex: 1;
  padding: 44px 24px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.category {
  margin-bottom: 40px;
}

.category-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.category-rule {
  height: 1px;
  background: var(--border);
  margin: 0 0 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.15s, border-color 0.15s;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--link);
}

.tile-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.tile-body {
  min-width: 0;
}

.tile-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--link);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile:hover .tile-name {
  color: var(--link-hover);
  text-decoration: underline;
}

.tile-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Empty state --- */
.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 15px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

.footer code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

@media (max-width: 600px) {
  .hero {
    padding: 44px 20px 52px;
  }
  .hero-title {
    font-size: 26px;
  }
}
