/*
Theme Name: Netcup Live
Theme URI: https://netcup.live/
Author: netcup.live
Author URI: https://netcup.live/
Description: A focused WordPress theme for live netcup coupon sharing, designed to work with the existing netcup API WordPress sync flow.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: netcup-live
*/

:root {
  --nl-bg: #f4f7f8;
  --nl-surface: #ffffff;
  --nl-surface-soft: #eef4f3;
  --nl-ink: #171717;
  --nl-muted: #5c666d;
  --nl-line: #d7e0e2;
  --nl-red: #e6423c;
  --nl-red-deep: #b91f23;
  --nl-teal: #169b8f;
  --nl-blue: #2f6fed;
  --nl-amber: #e6a923;
  --nl-green: #4f9d45;
  --nl-shadow: 0 16px 36px rgba(23, 23, 23, 0.09);
  --nl-radius: 8px;
  --nl-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--nl-ink);
  background: var(--nl-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

.nl-skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 30;
  padding: 10px 14px;
  color: #fff;
  background: var(--nl-ink);
  border-radius: var(--nl-radius);
  transition: top 0.15s ease;
}

.nl-skip-link:focus {
  top: 12px;
}

.nl-site {
  min-height: 100vh;
}

.nl-wrap {
  width: min(calc(100% - 32px), var(--nl-max));
  margin: 0 auto;
}

.nl-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 247, 248, 0.92);
  border-bottom: 1px solid rgba(215, 224, 226, 0.8);
  backdrop-filter: blur(14px);
}

.nl-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}

.nl-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nl-ink);
  text-decoration: none;
  font-weight: 800;
}

.nl-brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--nl-red);
  border-radius: var(--nl-radius);
  box-shadow: 0 8px 18px rgba(230, 66, 60, 0.22);
}

.nl-brand__name {
  line-height: 1;
}

.nl-brand__sub {
  display: block;
  margin-top: 2px;
  color: var(--nl-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.nl-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.nl-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nl-nav__links a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  color: var(--nl-muted);
  border-radius: var(--nl-radius);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.nl-nav__links a:hover,
.nl-nav__links a:focus-visible {
  color: var(--nl-ink);
  background: #fff;
  outline: none;
}

.nl-sync-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #24544f;
  background: #ddf2ee;
  border: 1px solid #b9dfd9;
  border-radius: var(--nl-radius);
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
}

.nl-dot {
  width: 8px;
  height: 8px;
  background: var(--nl-teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(22, 155, 143, 0.14);
}

.nl-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  color: #fff;
  background: #1b1f22;
}

.nl-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(90deg, rgba(18, 18, 18, 0.92), rgba(18, 18, 18, 0.55), rgba(18, 18, 18, 0.2)), var(--nl-hero-image);
  background-position: center;
  background-size: cover;
}

.nl-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: end;
  min-height: 360px;
  padding: 64px 0 38px;
}

.nl-hero__copy {
  max-width: 700px;
}

.nl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #d8f5ef;
  font-size: 0.88rem;
  font-weight: 800;
}

.nl-hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: 3rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.nl-hero p {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
}

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

.nl-stat {
  min-height: 86px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--nl-radius);
  backdrop-filter: blur(12px);
}

.nl-stat strong {
  display: block;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1.1;
}

.nl-stat span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 700;
}

.nl-main {
  padding-bottom: 58px;
}

.nl-toolbar {
  position: relative;
  z-index: 2;
  margin-top: -22px;
  padding: 14px;
  background: var(--nl-surface);
  border: 1px solid var(--nl-line);
  border-radius: var(--nl-radius);
  box-shadow: var(--nl-shadow);
}

.nl-toolbar__row {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 12px;
  align-items: center;
}

.nl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nl-tab {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: var(--nl-muted);
  background: var(--nl-surface-soft);
  border: 1px solid transparent;
  border-radius: var(--nl-radius);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
}

.nl-tab:hover,
.nl-tab:focus-visible,
.nl-tab.is-active {
  color: var(--nl-ink);
  background: #fff;
  border-color: var(--nl-line);
  outline: none;
}

.nl-search {
  position: relative;
}

.nl-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--nl-muted);
  transform: translateY(-50%);
}

.nl-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px 0 38px;
  color: var(--nl-ink);
  background: #fff;
  border: 1px solid var(--nl-line);
  border-radius: var(--nl-radius);
  outline: none;
}

.nl-search input:focus {
  border-color: var(--nl-blue);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.nl-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 34px 0 16px;
}

.nl-section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.nl-section-head p {
  margin: 6px 0 0;
  color: var(--nl-muted);
}

.nl-refresh {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--nl-ink);
  background: #fff;
  border: 1px solid var(--nl-line);
  border-radius: var(--nl-radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.nl-refresh:hover,
.nl-refresh:focus-visible {
  border-color: var(--nl-blue);
  outline: none;
}

.nl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.nl-coupon-card {
  display: flex;
  min-height: 276px;
  flex-direction: column;
  background: var(--nl-surface);
  border: 1px solid var(--nl-line);
  border-top: 4px solid var(--nl-accent, var(--nl-red));
  border-radius: var(--nl-radius);
  box-shadow: 0 8px 22px rgba(23, 23, 23, 0.05);
}

.nl-coupon-card[hidden] {
  display: none;
}

.nl-coupon-card__head {
  display: flex;
  min-height: 92px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
}

.nl-coupon-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.24;
  letter-spacing: 0;
}

.nl-coupon-card__meta {
  display: block;
  margin-top: 5px;
  color: var(--nl-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.nl-count {
  display: inline-flex;
  min-width: 44px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--nl-accent, var(--nl-red));
  background: color-mix(in srgb, var(--nl-accent, var(--nl-red)) 12%, #fff);
  border-radius: var(--nl-radius);
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

.nl-code-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 18px 18px;
  list-style: none;
}

.nl-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}

.nl-code {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  overflow: hidden;
  color: var(--nl-ink);
  background: #f7faf9;
  border: 1px dashed #c6d2d4;
  border-radius: var(--nl-radius);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nl-icon-btn,
.nl-use-link {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--nl-ink);
  background: #fff;
  border: 1px solid var(--nl-line);
  border-radius: var(--nl-radius);
  cursor: pointer;
  text-decoration: none;
}

.nl-use-link {
  color: #fff;
  background: var(--nl-accent, var(--nl-red));
  border-color: var(--nl-accent, var(--nl-red));
}

.nl-icon-btn svg,
.nl-use-link svg,
.nl-refresh svg,
.nl-brand__mark svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.nl-icon-btn:hover,
.nl-icon-btn:focus-visible {
  border-color: var(--nl-blue);
  outline: none;
}

.nl-use-link:hover,
.nl-use-link:focus-visible {
  filter: brightness(0.94);
  outline: none;
}

.nl-empty {
  display: flex;
  min-height: 132px;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin: 0 18px 18px;
  padding: 18px;
  color: var(--nl-muted);
  background: #f7faf9;
  border: 1px dashed #c6d2d4;
  border-radius: var(--nl-radius);
  text-align: center;
  font-weight: 700;
}

.nl-note {
  margin-top: 28px;
  padding: 18px;
  color: #30413f;
  background: #e9f5f2;
  border: 1px solid #c7e3dc;
  border-radius: var(--nl-radius);
}

.nl-note strong {
  color: #173d38;
}

.nl-footer {
  padding: 28px 0;
  color: var(--nl-muted);
  background: #fff;
  border-top: 1px solid var(--nl-line);
  font-size: 0.92rem;
}

.nl-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nl-footer a {
  color: var(--nl-ink);
  font-weight: 800;
  text-decoration: none;
}

.nl-page {
  padding: 52px 0 64px;
}

.nl-page__box {
  max-width: 820px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--nl-line);
  border-radius: var(--nl-radius);
}

.nl-page__box h1 {
  margin-top: 0;
  font-size: 2rem;
  line-height: 1.15;
}

.nl-entry-content {
  color: #273033;
}

.nl-entry-content a {
  color: var(--nl-blue);
  font-weight: 700;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .nl-hero__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .nl-hero__stats {
    max-width: 480px;
  }

  .nl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nl-toolbar__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nl-wrap {
    width: min(calc(100% - 24px), var(--nl-max));
  }

  .nl-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nl-nav {
    width: 100%;
    justify-content: space-between;
  }

  .nl-nav__links {
    display: none;
  }

  .nl-sync-pill {
    width: 100%;
    justify-content: center;
  }

  .nl-hero {
    min-height: 420px;
  }

  .nl-hero::before {
    background-image: linear-gradient(180deg, rgba(18, 18, 18, 0.92), rgba(18, 18, 18, 0.58)), var(--nl-hero-image);
  }

  .nl-hero__inner {
    min-height: 420px;
    padding: 44px 0 34px;
  }

  .nl-hero h1 {
    font-size: 2.2rem;
  }

  .nl-hero p {
    font-size: 1rem;
  }

  .nl-hero__stats {
    grid-template-columns: 1fr 1fr;
  }

  .nl-stat {
    min-height: 74px;
    padding: 13px;
  }

  .nl-stat strong {
    font-size: 1.45rem;
  }

  .nl-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .nl-grid {
    grid-template-columns: 1fr;
  }

  .nl-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
