/*
Theme Name: Излез Навън - Приключения
Theme URI: https://izleznavun.com/
Author: Izlez Navan Editorial
Description: Цветна editorial WordPress тема за българско outdoor списание, маршрути, екипировка и планинска безопасност.
Version: 1.0.1
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: izleznavun-navan
*/

:root {
  --forest-950: #0c2c28;
  --forest-900: #123a32;
  --forest-800: #1a4b3f;
  --forest-700: #256150;
  --moss-400: #81aa73;
  --mint-200: #c4e4d5;
  --sky-200: #bcdfe5;
  --sky-600: #35677c;
  --sun-400: #f4c75c;
  --coral-500: #ec7358;
  --cream-50: #fbf7ec;
  --cream-100: #f5edda;
  --cream-200: #eadfc8;
  --ink: #17352f;
  --muted: #5b6e68;
  --white: #fffdf7;
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 38px;
  --shadow: 0 20px 55px rgba(12, 44, 40, 0.12);
  --content: 1180px;
  --narrow: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 8%, rgba(244, 199, 92, 0.22), transparent 22rem),
    var(--cream-50);
  font-family: "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
a:hover { color: var(--coral-500); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

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

.screen-reader-text:focus {
  position: fixed !important;
  z-index: 10000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip: auto;
  color: var(--forest-950);
  background: var(--sun-400);
  border-radius: 999px;
}

.site-shell { min-height: 100vh; overflow: clip; }
.wrap { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), var(--narrow)); margin-inline: auto; }

.site-header {
  position: relative;
  z-index: 20;
  color: var(--white);
  background: var(--forest-950);
}

.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand:hover { color: var(--sun-400); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  color: var(--forest-950);
  background: var(--sun-400);
  border-radius: 50% 50% 45% 55%;
  transform: rotate(-6deg);
}

.brand-mark svg { width: 27px; transform: rotate(6deg); }

.primary-menu,
.footer-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-menu a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 750;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a { color: var(--sun-400); }

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  content: "";
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 610px;
  padding: 86px 0 74px;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 22%, var(--sun-400) 0 78px, transparent 79px),
    linear-gradient(125deg, var(--forest-950), var(--forest-800));
  overflow: hidden;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  bottom: -2px;
  content: "";
  clip-path: polygon(0 100%, 18% 48%, 31% 72%, 52% 20%, 69% 67%, 82% 38%, 100% 100%);
}

.hero::before {
  right: -4%;
  width: 65%;
  height: 63%;
  background: var(--forest-700);
  opacity: .72;
}

.hero::after {
  right: -10%;
  width: 57%;
  height: 46%;
  background: var(--moss-400);
  opacity: .78;
  transform: translateY(10px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, .72fr);
  align-items: center;
  gap: clamp(44px, 7vw, 96px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--sun-400);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 3px;
  content: "";
  background: currentColor;
  border-radius: 3px;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 7.4rem);
  line-height: .88;
  letter-spacing: -.075em;
}

.hero h1 span { display: block; color: var(--sun-400); }

.hero-lead {
  max-width: 620px;
  margin: 30px 0 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 13px 22px;
  color: var(--forest-950);
  background: var(--sun-400);
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
}

.button:hover { color: var(--forest-950); background: #ffd979; transform: translateY(-2px); }
.button-secondary { color: var(--white); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3); box-shadow: none; }
.button-secondary:hover { color: var(--white); background: rgba(255,255,255,.18); }

.trail-note {
  position: relative;
  padding: 30px;
  color: var(--ink);
  background: var(--cream-50);
  border: 1px solid rgba(255,255,255,.52);
  border-radius: var(--radius-lg) var(--radius-lg) 12px var(--radius-lg);
  box-shadow: 0 26px 70px rgba(5, 25, 22, .26);
  transform: rotate(2deg);
}

.trail-note::before {
  position: absolute;
  top: -16px;
  right: 26px;
  width: 74px;
  height: 34px;
  content: "";
  background: rgba(188, 223, 229, .82);
  transform: rotate(-6deg);
}

.trail-note-kicker { margin: 0; color: var(--coral-500); font-size: .76rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.trail-note h2 { margin: 9px 0 12px; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.05; letter-spacing: -.045em; }
.trail-note p { margin: 0; color: var(--muted); }
.trail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 22px; margin-top: 22px; border-top: 1px dashed var(--cream-200); }
.trail-stat strong { display: block; font-size: 1.25rem; }
.trail-stat span { color: var(--muted); font-size: .72rem; }

.category-ribbon {
  position: relative;
  z-index: 4;
  margin-top: -27px;
}

.category-list {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin: 0;
  overflow-x: auto;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--cream-200);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.category-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  white-space: nowrap;
  color: var(--forest-900);
  background: var(--cream-100);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 800;
  text-decoration: none;
}

.category-list a:hover { color: var(--white); background: var(--forest-700); }

.section { padding: clamp(74px, 9vw, 120px) 0; }
.section-mint { background: var(--mint-200); }
.section-forest { color: var(--white); background: var(--forest-950); }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

.section-heading h2,
.archive-header h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.9rem);
  line-height: .96;
  letter-spacing: -.065em;
}

.section-heading p { max-width: 430px; margin: 0; color: var(--muted); }
.section-forest .section-heading p { color: rgba(255,255,255,.7); }

.featured-story {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  min-height: 470px;
  overflow: hidden;
  color: var(--white);
  background: var(--forest-800);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.story-visual {
  position: relative;
  min-height: 360px;
  background:
    radial-gradient(circle at 70% 24%, var(--sun-400) 0 53px, transparent 54px),
    linear-gradient(145deg, var(--sky-600), #79aaad);
  overflow: hidden;
}

.story-visual::before,
.story-visual::after {
  position: absolute;
  bottom: -1px;
  left: -5%;
  width: 110%;
  content: "";
  clip-path: polygon(0 100%, 0 62%, 14% 37%, 27% 61%, 47% 16%, 66% 63%, 83% 35%, 100% 66%, 100% 100%);
}

.story-visual::before { height: 82%; background: var(--forest-700); opacity: .8; }
.story-visual::after { height: 58%; background: var(--forest-950); opacity: .92; transform: translateY(10px); }
.story-visual img { width: 100%; height: 100%; object-fit: cover; }

.story-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 6vw, 68px); }
.story-copy h3 { margin: 12px 0 18px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -.055em; }
.story-copy p { margin: 0 0 24px; color: rgba(255,255,255,.75); }

.meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.section-forest .meta, .featured-story .meta { color: rgba(255,255,255,.62); }
.tag { display: inline-flex; padding: 6px 11px; color: var(--forest-950); background: var(--sun-400); border-radius: 999px; font-size: .72rem; font-weight: 900; text-decoration: none; }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-md);
  transition: transform .22s ease, box-shadow .22s ease;
}
.post-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.card-visual { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sky-200); }
.card-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .card-visual img { transform: scale(1.035); }
.card-visual.no-image::before { position: absolute; inset: 0; content: ""; background: linear-gradient(150deg, transparent 48%, rgba(18,58,50,.78) 49% 69%, var(--forest-900) 70%); }
.card-visual.no-image::after { position: absolute; top: 25%; right: 16%; width: 54px; aspect-ratio: 1; content: ""; background: var(--sun-400); border-radius: 50%; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 25px; }
.card-body h3 { margin: 12px 0 16px; font-size: 1.38rem; line-height: 1.13; letter-spacing: -.035em; }
.card-body h3 a { text-decoration: none; }
.card-body .meta { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--cream-200); }

.safety-panel {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 32px;
  color: var(--forest-950);
  background: var(--sun-400);
  border-radius: var(--radius-lg);
  transform: rotate(-.6deg);
  box-shadow: var(--shadow);
}
.safety-icon { display: grid; place-items: center; width: 78px; aspect-ratio: 1; color: var(--white); background: var(--coral-500); border-radius: 28px; font-size: 2rem; }
.safety-panel h2 { margin: 0 0 5px; font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1; letter-spacing: -.04em; }
.safety-panel p { margin: 0; opacity: .78; }

.archive-header { padding: 80px 0 48px; background: var(--mint-200); }
.archive-description { max-width: 680px; color: var(--muted); }

.article-header { padding: 74px 0 54px; background: var(--mint-200); }
.article-header h1 { max-width: 940px; margin: 16px 0 22px; font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: .96; letter-spacing: -.065em; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 70px; padding: 70px 0 110px; }
.entry-content { font-size: 1.08rem; }
.entry-content h2 { margin: 2.1em 0 .55em; font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -.04em; }
.entry-content h3 { margin-top: 1.8em; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.35em; }
.entry-content blockquote { padding: 24px 28px; margin: 2em 0; background: var(--cream-100); border-left: 6px solid var(--coral-500); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.entry-content a { color: var(--sky-600); }
.entry-content img { border-radius: var(--radius-md); }
.article-aside { align-self: start; position: sticky; top: 26px; padding: 24px; background: var(--cream-100); border-radius: var(--radius-md); }
.article-aside h2 { margin: 0 0 10px; font-size: 1.2rem; }
.article-aside p { color: var(--muted); font-size: .9rem; }

.pagination { margin-top: 42px; }
.nav-links { display: flex; gap: 8px; }
.page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 13px; text-decoration: none; background: var(--cream-100); border-radius: 999px; }
.page-numbers.current { color: var(--white); background: var(--forest-800); }

.site-footer { padding: 70px 0 30px; color: var(--white); background: var(--forest-950); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 58px; }
.footer-title { max-width: 520px; margin: 18px 0; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; letter-spacing: -.055em; }
.footer-copy { max-width: 480px; color: rgba(255,255,255,.66); }
.footer-column h2 { margin: 0 0 18px; color: var(--sun-400); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-menu { align-items: flex-start; flex-direction: column; gap: 10px; }
.footer-menu a { color: rgba(255,255,255,.77); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 32px; margin-top: 54px; color: rgba(255,255,255,.48); border-top: 1px solid rgba(255,255,255,.12); font-size: .78rem; }

.empty-state { padding: 80px 0 110px; text-align: center; }
.empty-state h1 { font-size: clamp(3rem, 9vw, 8rem); letter-spacing: -.08em; }

@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .main-navigation {
    position: fixed;
    inset: 86px 0 auto;
    padding: 26px 20px 34px;
    background: var(--forest-950);
    border-top: 1px solid rgba(255,255,255,.1);
    transform: translateY(-130%);
    opacity: 0;
    visibility: hidden;
    transition: transform .24s ease, opacity .24s ease, visibility .24s;
  }
  .main-navigation.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  body.admin-bar .main-navigation { inset-block-start: 118px; }
  .primary-menu { align-items: flex-start; flex-direction: column; gap: 17px; }
  .primary-menu a { font-size: 1.12rem; }
  .hero-grid, .featured-story, .article-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .trail-note { max-width: 520px; }
  .featured-story { min-height: 0; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 782px) {
  body.admin-bar .main-navigation { inset-block-start: 120px; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap, .narrow { width: min(calc(100% - 28px), var(--content)); }
  .header-inner { min-height: 74px; }
  .main-navigation { inset-block-start: 74px; }
  .hero { padding: 58px 0 70px; }
  .hero h1 { font-size: clamp(3.45rem, 18vw, 5.4rem); }
  .hero::before { width: 94%; height: 44%; }
  .hero::after { width: 92%; height: 31%; }
  .trail-note { padding: 24px; transform: none; }
  .category-ribbon { margin-top: -22px; }
  .category-list { border-radius: 22px; }
  .section { padding: 72px 0; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
  .cards-grid { grid-template-columns: 1fr; }
  .story-copy { padding: 30px 25px 34px; }
  .safety-panel { grid-template-columns: 62px 1fr; padding: 24px; transform: none; }
  .safety-icon { width: 58px; border-radius: 20px; }
  .safety-panel .button { grid-column: 1 / -1; }
  .article-header { padding: 54px 0 36px; }
  .article-layout { gap: 38px; padding: 45px 0 75px; }
  .footer-grid { grid-template-columns: 1fr; gap: 38px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}

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