:root {
    --bg-dark: #0b1620;
    --bg-card: #111d29;
    --accent: #4fd1c5;
    --accent-soft: #38b2ac33;
    --text-main: #f5f5f5;
    --text-muted: #a0aec0;
    --radius-lg: 16px;
    --shadow-soft: 0 18px 30px rgba(0,0,0,0.35);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--font-main);
    background: radial-gradient(circle at top, #1a365d, #020617 60%);
    color: var(--text-main);
}

a {
    color: inherit;
}

/* Layout helpers */

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------------- HEADER & NAV ---------------- */

.site-header {
    border-bottom: 1px solid #1f2933;
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 1.05rem;
}

.logo a {
    text-decoration: none;
    color: var(--text-main);
}

/* Main nav */

.main-nav .nav-list {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.main-nav a,
.main-nav .nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: none;
    background: transparent;
    cursor: pointer;
}

.main-nav a:hover,
.main-nav .nav-link:hover {
    color: var(--accent);
    background: rgba(15, 23, 42, 0.9);
}

/* Dropdown */

.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #020617;
    border-radius: 0.35rem;
    padding: 0.35rem 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
    display: none;
    z-index: 60;
}

.dropdown li a {
    display: block;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    white-space: nowrap;
    color: var(--text-muted);
}

.dropdown li a:hover {
    background: #0b1120;
    color: var(--accent);
}

/* Show dropdown on hover (desktop) */

.has-dropdown:hover .dropdown {
    display: block;
}

/* ----------- TYPOGRAPHY / GLOBAL CONTENT ----------- */

main,
.page,
.content {
    margin-top: 1.75rem;
    margin-bottom: 3rem;
}

main .container,
.page .container,
.content .container {
    padding-top: 0.5rem;
}

h1, h2, h3, h4 {
    margin-top: 0;
    font-weight: 600;
}

p {
    line-height: 1.6;
}

.subtitle {
    color: var(--text-muted);
    margin-top: -0.3rem;
}

/* Hero (index) */

.hero {
    padding: 4rem 0 3rem;
}

.hero h1 {
    font-size: clamp(2.1rem, 3vw, 2.7rem);
    margin-bottom: 0.75rem;
}

.hero p {
    color: var(--text-muted);
    max-width: 40rem;
    line-height: 1.6;
}

/* Buttons */

.btn-primary {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 999px;
    background: var(--accent);
    color: #0b1120;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

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

/* Cards / grids */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    padding-bottom: 3rem;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid #1f2937;
}

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

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card a {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}



/* Article layout */

.article-content {
  max-width: 720px;          /* vai 760 / 800 – pēc gaumes */
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  line-height: 1.7;
  font-size: 1rem;
}

.article-content h1 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}
.article-content h2 {
  font-size: 1.3rem;
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
}
.article-content p {
  margin: 0.7rem 0;
}

article {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
    background: transparent;
}

article h1 {
    margin-bottom: 0.5rem;
}

article h2 {
    margin-top: 2rem;
}

article h3 {
    margin-top: 1.4rem;
}

article ul {
    padding-left: 1.25rem;
}

article a {
    color: var(--accent);
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
}

/* Resource / affiliate boxes */
/* Affiliate boxes
   ------------------------------------------------------------------ */

.affiliate-box {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.45); /* soft grey/blue */
  background: radial-gradient(circle at top left,
              rgba(56, 189, 248, 0.10),
              rgba(15, 23, 42, 0.95));
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.affiliate-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.affiliate-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.16);
  color: #5eead4;
  font-weight: 600;
}

.affiliate-pill::before {
  content: "✔";
  font-size: 0.8em;
}

.affiliate-tag {
  opacity: 0.85;
}

.affiliate-title {
  margin: 0.1rem 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.affiliate-description {
  margin: 0;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.affiliate-button {
  align-self: flex-start;
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #020617;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.affiliate-button:hover,
.affiliate-button:focus-visible {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.affiliate-button::after {
  content: "↗";
  font-size: 0.85em;
  margin-left: 0.35rem;
}

.affiliate-note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #9ca3af;
  opacity: 0.9;
}


.resources-box .disclaimer,
.affiliate-box .disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
}

/* Footer */

.site-footer {
    border-top: 1px solid #1f2933;
    padding: 1rem 0 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ----------------- RESPONSIVE ----------------- */

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .main-nav .nav-list {
        flex-wrap: wrap;
        row-gap: 0.4rem;
    }

    .has-dropdown {
        position: static;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0.25rem 0 0.25rem 0.5rem;
    }

    .dropdown li a {
        padding-left: 1.4rem;
    }

    article {
        padding-inline: 1.25rem;
    }
}
