/* ========================================
   KARMA+ REDESIGN STYLES
   Prefix: kp- to avoid Bootstrap conflicts
   ======================================== */

/* Google Fonts imported in base.html */

:root {
  /* New Design System */
  --kp-ink: #0D0D0D;
  --kp-cream: #F5F0E8;
  --kp-gold: #D4A017;
  --kp-gold-light: #F0C842;
  --kp-sky: #1A3A5C;
  --kp-sky-mid: #2A5FA0;
  --kp-sky-light: #4B8BD4;
  --kp-warm: #E8DCC8;
  --kp-muted: #6B6560;
  --kp-border: rgba(13,13,13,0.12);
  --kp-radius: 16px;
  --kp-font-main: 'Manrope', sans-serif;
  --kp-font-display: 'Unbounded', sans-serif;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Offset for sticky navbar when scrolling to anchors */
[id] {
  scroll-margin-top: 110px;
}

/* ========================================
   NAVBAR - NEW DESIGN - High priority
   ======================================== */
nav.kp-navbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 1100 !important;
  background: rgba(245,240,232,0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid var(--kp-border) !important;
  padding: 0 2.5rem !important;
  height: 65px !important;
  min-height: 65px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}

.kp-nav-logo {
  font-family: var(--kp-font-display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--kp-ink);
}

.kp-nav-logo:hover {
  color: var(--kp-ink);
  text-decoration: none;
}

.kp-logo-mark {
  width: 26px;
  height: 26px;
  background: var(--kp-sky);
  border-radius: 7px;
  display: grid;
  place-items: center;
}

.kp-logo-mark span {
  color: var(--kp-gold);
  font-size: 10px;
  font-weight: 900;
}

.kp-nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  margin: 0 0 0 1.5rem;
  padding: 0;
}

nav.kp-navbar .kp-nav-links a {
  text-decoration: none;
  color: var(--kp-muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--kp-font-main);
  transition: color 0.2s;
}

nav.kp-navbar .kp-nav-links a:hover {
  color: var(--kp-ink);
  text-decoration: none;
}

nav.kp-navbar .kp-nav-cta {
  background: var(--kp-sky) !important;
  color: #fff !important;
  padding: 7px 18px !important;
  border-radius: 50px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
  border: none !important;
  text-decoration: none !important;
}

.kp-nav-cta:hover {
  background: var(--kp-sky-mid) !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* Nav button style for icons */
.kp-nav-btn {
  background: transparent;
  color: var(--kp-muted);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--kp-font-main);
}

.kp-nav-btn:hover {
  color: var(--kp-ink);
  background: rgba(13,13,13,0.05);
}

/* ========================================
   LANDING PAGE - HERO
   ======================================== */
.kp-landing {
  background: var(--kp-cream);
  font-family: var(--kp-font-main);
}

.kp-hero {
  min-height: calc(100vh - 65px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  position: relative;
  overflow: hidden;
}

.kp-hero-left {
  padding: 6rem 4rem 6rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.kp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(26,58,92,0.08);
  border: 1px solid rgba(26,58,92,0.15);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--kp-sky);
  margin-bottom: 2.5rem;
  width: fit-content;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kp-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kp-gold);
  animation: kpPulse 2s infinite;
}

@keyframes kpPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.kp-hero-title {
  font-family: var(--kp-font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 4.5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
  color: var(--kp-ink);
}

.kp-hero-title em {
  font-style: normal;
  color: var(--kp-sky);
  position: relative;
}

.kp-hero-title em::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--kp-gold);
  border-radius: 3px;
}

.kp-hero-sub {
  font-size: 1.15rem;
  color: var(--kp-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 3rem;
  font-weight: 400;
}

.kp-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.kp-btn-primary {
  background: var(--kp-sky);
  color: #fff;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s, background 0.2s;
  border: none;
  cursor: pointer;
  font-family: var(--kp-font-main);
}

.kp-btn-primary:hover {
  background: var(--kp-sky-mid);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

.kp-btn-secondary {
  background: transparent;
  color: var(--kp-ink);
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--kp-border);
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
  font-family: var(--kp-font-main);
}

.kp-btn-secondary:hover {
  border-color: var(--kp-ink);
  transform: translateY(-2px);
  color: var(--kp-ink);
  text-decoration: none;
}

/* Hero Right - Map */
.kp-hero-right {
  background: var(--kp-sky);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kp-hero-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.02) 40px,
    rgba(255,255,255,0.02) 41px
  );
}

.kp-ukraine-visual {
  position: relative;
  z-index: 2;
  width: 80%;
  max-width: 380px;
}

.kp-map-glow {
  filter: drop-shadow(0 0 40px rgba(212,160,23,0.35));
  width: 100%;
  height: auto;
}

.kp-map-dot {
  animation: kpMapPulse 3s ease-in-out infinite;
}

.kp-map-dot:nth-child(2) { animation-delay: 0.5s; }
.kp-map-dot:nth-child(3) { animation-delay: 1s; }
.kp-map-dot:nth-child(4) { animation-delay: 1.5s; }
.kp-map-dot:nth-child(5) { animation-delay: 2s; }

@keyframes kpMapPulse {
  0%, 100% { r: 5; opacity: 0.7; }
  50% { r: 8; opacity: 1; }
}

.kp-stat-chips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2rem;
  align-items: center;
}

.kp-chip {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 10px 20px;
  color: #fff;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--kp-font-main);
  font-weight: 500;
}

.kp-chip-num {
  font-family: var(--kp-font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--kp-gold-light);
}

/* ========================================
   STATS BAR
   ======================================== */
.kp-stats-bar {
  background: var(--kp-ink);
  padding: 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.kp-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kp-stat-num {
  font-family: var(--kp-font-display);
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--kp-gold);
  line-height: 1;
}

.kp-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kp-stats-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
}

/* ========================================
   SECTIONS
   ======================================== */
.kp-section {
  padding: 6rem 4rem;
  background: var(--kp-cream);
}

.kp-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kp-sky);
  margin-bottom: 0.75rem;
  font-family: var(--kp-font-main);
}

.kp-section-title {
  font-family: var(--kp-font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 520px;
  margin-bottom: 1rem;
  color: var(--kp-ink);
}

.kp-section-sub {
  font-size: 1rem;
  color: var(--kp-muted);
  max-width: 480px;
  margin-bottom: 3.5rem;
}

/* Steps Grid */
.kp-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--kp-border);
  border: 1.5px solid var(--kp-border);
  border-radius: var(--kp-radius);
  overflow: hidden;
}

.kp-step-card {
  background: var(--kp-cream);
  padding: 2.5rem 2rem;
  position: relative;
  transition: background 0.2s;
}

.kp-step-card:hover {
  background: var(--kp-warm);
}

.kp-step-num {
  font-family: var(--kp-font-display);
  font-weight: 900;
  font-size: 3rem;
  color: rgba(13,13,13,0.06);
  line-height: 1;
  margin-bottom: 1rem;
}

.kp-step-icon {
  width: 44px;
  height: 44px;
  background: var(--kp-sky);
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
  color: #fff;
}

.kp-step-title {
  font-family: var(--kp-font-display);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
  color: var(--kp-ink);
}

.kp-step-desc {
  font-size: 0.875rem;
  color: var(--kp-muted);
  line-height: 1.65;
}

/* ========================================
   CATEGORIES SECTION
   ======================================== */
.kp-categories-section {
  background: var(--kp-sky);
  padding: 5rem 4rem;
  color: #fff;
}

.kp-categories-section .kp-section-label {
  color: var(--kp-gold-light);
}

.kp-categories-section .kp-section-title {
  color: #fff;
}

.kp-categories-section .kp-section-sub {
  color: rgba(255,255,255,0.6);
}

.kp-cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kp-cat-card {
  background: rgba(75,139,212,0.12);
  border: 1px solid rgba(75,139,212,0.25);
  border-radius: var(--kp-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.kp-cat-card:hover {
  background: rgba(75,139,212,0.22);
  transform: translateY(-3px);
}

.kp-cat-icon-wrap {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: rgba(212,160,23,0.85);
}

.kp-cat-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.kp-cat-name {
  font-family: var(--kp-font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #fff;
}

.kp-cat-count {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
}

/* ========================================
   TWO PATHS SECTION
   ======================================== */
.kp-paths-section {
  padding: 6rem 4rem;
  background: var(--kp-warm);
}

.kp-paths-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.kp-path-card {
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.kp-path-card.kp-seek {
  background: var(--kp-cream);
  border: 1.5px solid var(--kp-border);
}

.kp-path-card.kp-give {
  background: var(--kp-sky);
  color: #fff;
}

.kp-path-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  display: inline-block;
  font-family: var(--kp-font-main);
}

.kp-seek .kp-path-tag {
  background: rgba(26,58,92,0.1);
  color: var(--kp-sky);
}

.kp-give .kp-path-tag {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}

.kp-path-title {
  font-family: var(--kp-font-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.kp-give .kp-path-title {
  color: #fff;
}

.kp-path-desc {
  font-size: 0.9rem;
  color: var(--kp-muted);
  margin-bottom: 2rem;
  line-height: 1.65;
}

.kp-give .kp-path-desc {
  color: rgba(255,255,255,0.65);
}

.kp-path-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2.5rem;
  padding: 0;
}

.kp-path-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
}

.kp-seek .kp-path-step {
  color: var(--kp-ink);
}

.kp-give .kp-path-step {
  color: rgba(255,255,255,0.85);
}

.kp-step-bullet {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.kp-seek .kp-step-bullet {
  background: rgba(26,58,92,0.1);
  color: var(--kp-sky);
}

.kp-give .kp-step-bullet {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.kp-path-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: gap 0.2s;
  font-family: var(--kp-font-main);
}

.kp-seek .kp-path-btn {
  color: var(--kp-sky);
}

.kp-give .kp-path-btn {
  color: var(--kp-gold-light);
}

.kp-path-btn:hover {
  gap: 14px;
  text-decoration: none;
}

/* ========================================
   FOOTER - NEW DESIGN
   ======================================== */
/* ========================================
   SVG ICONS
   ======================================== */
.kp-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kp-icon-sm {
  width: 16px;
  height: 16px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .kp-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .kp-hero {
    grid-template-columns: 1fr;
  }
  
  .kp-hero-right {
    min-height: 320px;
  }
  
  .kp-steps-grid {
    grid-template-columns: 1fr;
  }
  
  .kp-paths-grid {
    grid-template-columns: 1fr;
  }
  
  .kp-section,
  .kp-paths-section {
    padding: 4rem 1.5rem;
  }
  
  .kp-categories-section {
    padding: 4rem 1.5rem;
  }
  
  .kp-hero-left {
    padding: 3rem 1.5rem;
  }
  
  .kp-stats-bar {
    padding: 1.5rem;
    justify-content: center;
  }
  
  .kp-navbar {
    padding: 0 1.5rem;
  }
  
  .kp-nav-links {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  /* Забороняємо горизонтальний скрол на всьому сайті */
  html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  /* Navbar mobile: лише лого + CTA */
  nav.kp-navbar {
    padding: 0 1.25rem !important;
    height: 58px !important;
    min-height: 58px !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }
  .kp-nav-links li {
    display: none !important;
  }
  .kp-nav-links li:last-child {
    display: block !important;
  }
  .kp-nav-links {
    gap: 0 !important;
    margin-left: 0 !important;
  }
  .kp-nav-logo {
    font-size: 1rem !important;
  }
  .kp-logo-mark {
    width: 22px !important;
    height: 22px !important;
  }
  nav.kp-navbar .kp-nav-cta {
    padding: 10px 20px !important;
    font-size: 0.82rem !important;
  }

  /* Hero mobile */
  .kp-hero {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }
  .kp-hero-right {
    display: none !important;
  }
  .kp-hero-left {
    padding: 2.5rem 1.25rem 2rem !important;
  }
  .kp-hero-badge {
    font-size: 0.7rem !important;
    padding: 6px 14px !important;
    margin-bottom: 1.5rem !important;
  }
  .kp-hero-title {
    font-size: clamp(2rem, 9vw, 2.6rem) !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.08 !important;
  }
  .kp-hero-sub {
    font-size: 0.95rem !important;
    margin-bottom: 2rem !important;
    line-height: 1.65 !important;
  }
  .kp-hero-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .kp-btn-primary,
  .kp-btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 0.95rem !important;
  }
}

@media (max-width: 600px) {
  .kp-cats-grid {
    grid-template-columns: 1fr;
  }
  
  .kp-stats-divider {
    display: none;
  }
  
  .kp-stats-bar {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .kp-stat-item {
    align-items: center;
  }
}

/* ========================================
   FOOTER BAR
   ======================================== */
.kp-footer-bar {
  background: #F5F0E8 !important;
  border-top: 1px solid var(--kp-border);
  padding: 0 4rem;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  font-family: var(--kp-font-main);
}

.kp-footer-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.kp-footer-links a {
  text-decoration: none;
  color: var(--kp-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.kp-footer-links a:hover {
  color: var(--kp-ink);
}

.kp-footer-copy {
  font-size: 0.8rem;
  color: var(--kp-muted);
}

@media (max-width: 768px) {
  .kp-footer-bar {
    display: none !important;
  }
  .kp-footer-bar--landing {
    display: flex !important;
    padding: 0 1.25rem !important;
    height: 58px !important;
    flex-wrap: nowrap !important;
  }
  .kp-footer-bar--landing .kp-footer-copy {
    display: none;
  }
}

/* ========================================
   OVERRIDE main-content padding for landing
   ======================================== */
.kp-landing .main-content,
body.kp-landing-page .main-content {
  padding: 0 !important;
}
