:root {
  --color-bg: #ffffff;
  --color-accent-green: #c8d9cf;
  --color-accent-lavender: #e0c9e1;
  --color-cta-green: #8fba9f;
  --color-cta-lavender: #c9a8cc;
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-border: #e0e0e0;
  --max-content: 1200px;
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header-inner {
  height: var(--header-height);
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  height: 48px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  position: relative;
  gap: 0;
}

.site-nav .nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .nav-links a {
  text-decoration: none;
  font-weight: 500;
}
.site-nav .nav-links a:hover {
  text-decoration: underline;
}

.site-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
}
.nav-toggle:hover {
  background: var(--color-border);
}

.nav-dropdown {
  display: none;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .site-nav .nav-links {
    display: none;
  }
  .nav-dropdown {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 99;
  }
  .nav-dropdown[hidden] {
    display: none !important;
  }
  .nav-dropdown a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    color: var(--color-text);
  }
  .nav-dropdown a:hover {
    background: var(--color-accent-green);
    text-decoration: none;
  }
}

@media (min-width: 769px) {
  .nav-dropdown {
    display: none !important;
  }
}

.nav-cart-link {
  display: none !important;
}

.nav-account-link {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn i {
  margin-right: 0.4em;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-cta {
  background: var(--color-cta-green);
  color: #1a1a1a;
}

.btn-cta:hover {
  background: var(--color-accent-green);
}

.btn-cta-secondary {
  background: var(--color-cta-lavender);
  color: #1a1a1a;
}

.btn-cta-secondary:hover {
  background: var(--color-accent-lavender);
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-switcher a {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.lang-switcher a.active {
  background: var(--color-accent-green);
}

/* Main */
main {
  min-height: calc(100vh - var(--header-height) - 200px);
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* Footer */
.site-footer {
  position: relative;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  border-top: 1px solid var(--color-border);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.5rem;
}

.footer-grid a {
  font-size: 0.9rem;
}

.footer-grid .disabled-link {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  cursor: default;
  user-select: none;
}

.footer-social li {
  margin-bottom: 0.5rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: inherit;
  text-decoration: none;
}
.footer-social a:hover span {
  text-decoration: underline;
}
.footer-social a i {
  width: 1.25em;
  text-align: center;
  color: var(--color-text-muted);
}
.footer-social a:hover i {
  color: var(--color-text);
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

.footer-copyright a {
  color: inherit;
  text-decoration: none;
}
.footer-copyright a:hover {
  text-decoration: underline;
}

.blog-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 768px) {
  .blog-card {
    grid-template-columns: 1fr;
  }
}

.blog-card img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-accent-lavender);
}
.blog-card .blog-card-placeholder {
  display: block;
  aspect-ratio: 1200/628;
  border-radius: 8px;
  background: var(--color-accent-lavender);
}

.blog-card h2 {
  margin: 0 0 0.25rem;
}

.blog-card p {
  margin: 0.5rem 0 0;
}

.blog-card .btn-cta {
  margin-top: 1.25rem;
}

.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.blog-pagination-status {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  order: 2;
  flex-basis: 100%;
  text-align: center;
}

@media (min-width: 480px) {
  .blog-pagination {
    justify-content: space-between;
  }
  .blog-pagination-status {
    order: 0;
    flex-basis: auto;
    flex: 1;
  }
  .blog-pagination-prev {
    order: -1;
  }
  .blog-pagination-next {
    order: 1;
  }
}

.blog-pagination .blog-pagination-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

.blog-read-more {
  width: 100%;
}

.blog-read-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .blog-read-more-grid {
    grid-template-columns: 1fr;
  }
}

.blog-read-more-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg, #fff);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-read-more-card:hover {
  border-color: var(--color-accent-lavender);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: scale(1.05);
}

.blog-read-more-image-link {
  display: block;
  aspect-ratio: 16/10;
  background: var(--color-accent-lavender);
  overflow: hidden;
}

.blog-read-more-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-read-more-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100px;
  aspect-ratio: 16/10;
}

.blog-read-more-body {
  padding: 0.75rem;
}

.blog-read-more-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.3;
}

.blog-read-more-title a:hover {
  text-decoration: none;
}

.blog-read-more-excerpt {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.blog-read-more-card .btn-cta {
  margin-top: 0.75rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}
.patterns-section {
  padding-top: 2.5rem;
}
.blog-latest-section {
  padding-bottom: 1.5rem;
}
.subscribe-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.section-title {
  font-size: 1.75rem;
  margin: 0 0 1rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.block-accent-green {
  background: var(--color-accent-green);
  padding: 2rem;
  border-radius: 8px;
}

.block-benefits {
  position: relative;
  padding: 1.5rem 0 3rem;
}
.block-benefits::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: #e0c9e1;
  z-index: -1;
  pointer-events: none;
}

.block-accent-lavender {
  background: var(--color-accent-lavender);
  padding: 2rem;
  border-radius: 8px;
}

.block-about {
  position: relative;
}
.block-about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: #c8d9cf;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: var(--max-content);
  margin: 0 auto;
}

/* Error pages (4xx, 5xx) */
.error-page {
  padding: 4rem 1.5rem;
  text-align: center;
}
.error-page-inner {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.error-code {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12rem;
  font-weight: 700;
  color: var(--color-accent-green);
  margin: 0 0 0.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.error-title {
  margin: 0 0 1rem;
}
.error-message {
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
}
.error-cta {
  margin: 0;
}

.hero-section {
  position: relative;
  padding: 4rem 0 2rem;
  text-align: center;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: #f0f0f0;
  z-index: -1;
  pointer-events: none;
}
.hero-title { font-size: 2rem; margin: 0 0 1rem; line-height: 1.2; }
.hero-subtitle { font-size: 1.1rem; color: var(--color-text-muted); max-width: 560px; margin: 0 auto 1.5rem; }
.hero-cta { margin: 0; }

.hero-slider { position: relative; }
.hero-track-wrap {
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.hero-track {
  display: flex;
  width: calc(var(--hero-count, 1) * 100%);
  transition: transform 0.5s ease;
}
.hero-slide {
  flex: 0 0 calc(100% / var(--hero-count, 1));
  width: calc(100% / var(--hero-count, 1));
  box-sizing: border-box;
  min-width: 0;
}
.hero-content { font-size: 1.1rem; color: var(--color-text-muted); max-width: 560px; margin: 0 auto 1.5rem; }
.hero-content p { margin: 0 0 0.5rem; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.2s ease, background 0.2s, border-color 0.2s;
}
.hero-arrow:hover { background: #f5f5f5; border-color: #999; transform: translateY(-50%) scale(1.05); }
.hero-prev { left: 0; }
.hero-next { right: 0; }
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.hero-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s;
}
.hero-dot:hover { background: #ddd; transform: scale(1.05); }
.hero-dot.active { background: var(--color-text); }

/* Blog list: hero slides use same layout as .blog-card */
.hero-slider--blog .hero-slide {
  text-align: left;
  padding: 0 3rem;
  box-sizing: border-box;
}
.hero-slider--blog .hero-slide .blog-card {
  margin: 0 auto;
  max-width: 52rem;
}
@media (max-width: 768px) {
  .hero-slider--blog .hero-slide {
    padding: 0 2.75rem;
  }
}

.search-section { padding: 1rem 0 2rem; }
.search-autocomplete { position: relative; }
.search-form { display: flex; gap: 0.5rem; width: 100%; }
.search-input { flex: 1; min-width: 0; padding: 0.5rem 1rem; border: 1px solid var(--color-border); border-radius: 6px; font-size: 1rem; }
.search-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
}
.search-autocomplete-list:not([hidden]) { display: block; }
.search-autocomplete-list[hidden] { display: none !important; }
.search-autocomplete-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  border: none;
  background: none;
  font-size: 1rem;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.search-autocomplete-item:hover,
.search-autocomplete-item:focus {
  background: var(--color-accent-green, #e8f5e9);
}
.search-autocomplete-item + .search-autocomplete-item { border-top: 1px solid var(--color-border); }
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.tag-cloud-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.tag-cloud-tag:hover {
  background: var(--color-accent-green);
  border-color: var(--color-accent-green);
  text-decoration: none;
  transform: scale(1.05);
}
.tag-cloud-tag.active {
  background: var(--color-accent-green);
  border-color: var(--color-accent-green);
  font-weight: 600;
}
.muted { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }
.pattern-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.pattern-cards--inline { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .pattern-cards--inline { grid-template-columns: 1fr; } }
@media (min-width: 641px) and (max-width: 900px) { .pattern-cards--inline { grid-template-columns: repeat(2, 1fr); } }
.pattern-list-empty { padding: 1.5rem 0; }
.pattern-list-empty-text { margin: 0 0 1rem; }
.pattern-card { border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; background: #fff; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.pattern-card:hover { border-color: var(--color-accent-lavender); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); transform: scale(1.05); }
.pattern-card-image-link { display: block; aspect-ratio: 1; background: var(--color-accent-lavender); overflow: hidden; position: relative; }
.pattern-card-image-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pattern-card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.pattern-card:hover .pattern-card-video { opacity: 1; }
.pattern-card-placeholder { width: 100%; height: 100%; min-height: 0; aspect-ratio: 1; background: var(--color-accent-green); }
.pattern-card-body { padding: 0.5rem 0.75rem; display: flex; flex-direction: column; }
.pattern-card-title { margin: 0 0 0.35rem; font-size: 1rem; }
.pattern-card-title a:hover { text-decoration: none; }
.pattern-card-price-row { margin: 0 0 0.25rem; }
.pattern-card-price { margin: 0; font-weight: 600; color: #397851; }
.pattern-card-difficulty { margin: 0 0 0.25rem; }
.pattern-card-difficulty .pattern-card-difficulty-label { font-size: 0.8rem; color: var(--color-text-muted, #666); }
.pattern-card-difficulty .star { color: #ddd; }
.pattern-card-difficulty .star.filled { color: #e6b800; }
.pattern-card-cta { margin-top: auto; padding-top: 0.35rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.9rem; }
.section-cta { margin: 2rem 0 0; text-align: center; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.benefit-item {
  text-align: center;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  transition: transform 0.2s ease;
}
.benefit-item:hover {
  transform: scale(1.05);
}
.benefit-icon { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.benefit-item p { margin: 0; font-size: 0.95rem; }
.reviews-carousel { width: 1048px; max-width: 100%; margin: 0 auto; overflow-x: auto; scrollbar-width: none; padding: 0 20px; box-sizing: border-box; }
.reviews-track { display: flex; gap: 1.5rem; padding: 1rem 0; width: max-content; }
.review-card { flex: 0 0 320px; padding: 1.25rem; background: #fff; border-radius: 8px; border: 1px solid var(--color-border); margin: 0; transition: transform 0.2s ease; }
.review-card:hover { transform: scale(1.05); }
.review-text { margin: 0 0 1rem; font-size: 0.95rem; }
.review-card footer { font-size: 0.85rem; color: var(--color-text-muted); }
.review-stars .filled { color: #e6b800; }
.block-about .btn-cta {
  background: var(--color-cta-lavender);
  color: #1a1a1a;
}
.block-about .btn-cta:hover {
  background: var(--color-accent-lavender);
}

.about-grid { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: center; }
.about-grid-top { grid-template-rows: auto auto; align-items: start; }
.about-grid-top .about-grid-title { grid-column: 1 / -1; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; text-align: center; } }
.about-photo-circle { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; }
.about-photo-placeholder { width: 180px; height: 180px; border-radius: 50%; background: var(--color-accent-green); margin: 0 auto; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.about-photo-placeholder .about-photo-logo { width: 100%; height: 100%; object-fit: contain; padding: 12%; }
.about-photo-placeholder .about-photo-logo.about-photo-cover { object-fit: cover; padding: 0; }
.about-text { max-width: 800px; }
.about-text p { margin: 0 0 1rem; }
.subscribe-form { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.subscribe-form input[type="text"],
.subscribe-form input[type="email"] { padding: 0.5rem 1rem; border: 1px solid var(--color-border); border-radius: 6px; font-size: 1rem; }
.subscribe-form .consent-label a { text-decoration: underline; }
.subscribe-form .consent-label a:hover { text-decoration: none; }
.consent-label { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.consent-label input { margin-top: 0.2rem; }
.messages { list-style: none; margin: 1rem 0; padding: 0.75rem 1rem; background: var(--color-accent-green); border-radius: 6px; }
.messages li { margin: 0; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  background: var(--color-accent-lavender);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.cookie-banner--hidden {
  transform: translateY(100%);
  opacity: 0;
}
.cookie-banner-text {
  margin: 0;
  font-size: 0.95rem;
  max-width: 600px;
}
.cookie-banner-btn {
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--color-cta-green);
  color: var(--color-text);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.scroll-to-top:hover {
  background: var(--color-accent-green);
  transform: scale(1.05);
}
.scroll-to-top:focus {
  outline: none;
}

/* Auth / login form */
.auth-form-container {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.auth-form .form-group label {
  font-weight: 500;
  font-size: 0.95rem;
}
.auth-form .form-group input {
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  max-width: 100%;
}
.auth-form .form-group input:focus {
  outline: none;
  border-color: var(--color-cta-green);
  box-shadow: 0 0 0 2px rgba(143, 186, 159, 0.25);
}
.auth-form .form-error {
  font-size: 0.85rem;
  color: #c00;
}
.auth-form .form-actions {
  margin-top: 0.5rem;
}
.auth-form .btn-login {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1.1rem;
  min-height: 48px;
}
.auth-form-back {
  margin-top: 1.5rem;
  text-align: center;
}
.auth-form-back a {
  font-size: 0.95rem;
}

/* Pattern detail gallery */
.pattern-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .pattern-detail-layout {
    grid-template-columns: 1fr;
  }
}
.pattern-detail-gallery {
  position: relative;
}
.blog-post-lead-media {
  margin: 1rem 0 1.5rem;
}
.blog-post-lead-media__img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  vertical-align: middle;
}
.pattern-gallery-pin-btn {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  background: #e60023;
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.pattern-gallery-pin-btn:hover,
.pattern-gallery-pin-btn:focus,
.pattern-gallery-pin-btn:focus-visible {
  background: #ad0814;
  color: #fff !important;
  transform: scale(1.02);
  text-decoration: none;
}
.pattern-gallery-pin-btn i {
  font-size: 1.1rem;
  line-height: 1;
}
.pattern-gallery:hover .pattern-gallery-pin-btn,
.pattern-detail-gallery:hover .pattern-gallery-pin-btn,
.pattern-gallery:focus-within .pattern-gallery-pin-btn,
.pattern-detail-gallery:focus-within .pattern-gallery-pin-btn,
.pattern-gallery-pin-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: none) {
  .pattern-gallery-pin-btn {
    opacity: 1;
    pointer-events: auto;
  }
}
.pattern-gallery-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.pattern-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.pattern-gallery-slide {
  display: none;
  position: absolute;
  inset: 0;
}
.pattern-gallery-slide.active {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}
.pattern-gallery-slide.fade-in {
  animation: gallery-fade-in 1s ease;
}
@keyframes gallery-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.pattern-gallery-slide img,
.pattern-gallery-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 8px;
  cursor: pointer;
}
.pattern-gallery-slide img {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='13' fill='%23fff'/%3E%3Ccircle cx='16' cy='16' r='13' fill='none' stroke='%23212121' stroke-width='1.5'/%3E%3Cpath d='M21.78 10.22a.75.75 0 0 1 .22.53v3a.75.75 0 0 1-1.5 0v-1.19l-2.22 2.22a.75.75 0 1 1-1.06-1.06l2.22-2.22H18.25a.75.75 0 0 1 0-1.5h3a.75.75 0 0 1 .53.22z' fill='%23212121'/%3E%3Cpath d='M10 21.75a.75.75 0 0 0 .22.53.75.75 0 0 0 .53.22h3a.75.75 0 0 0 0-1.5h-1.19l2.22-2.22a.75.75 0 1 0-1.06-1.06L11.5 19.94v-1.19a.75.75 0 0 0-1.5 0v3z' fill='%23212121'/%3E%3C/svg%3E") 16 16, pointer;
}
.pattern-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  color: var(--color-text);
  transition: transform 0.2s ease, background 0.2s ease;
}
.pattern-gallery-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}
.pattern-gallery-prev { left: 12px; }
.pattern-gallery-next { right: 12px; }
.pattern-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  width: 100%;
}
.pattern-gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease;
}
.pattern-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.5;
  filter: grayscale(30%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.pattern-gallery-thumb:hover img {
  opacity: 0.8;
  filter: grayscale(0%);
}
.pattern-gallery-thumb.active img {
  opacity: 1;
  filter: grayscale(0%);
}
.pattern-gallery-thumb:hover {
  border-color: var(--color-border);
}
.pattern-gallery-thumb.active {
  border-color: var(--color-cta-green);
}
.pattern-gallery-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* Pattern detail lightbox */
.pattern-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pattern-lightbox[hidden] {
  display: none !important;
}
.pattern-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}
.pattern-lightbox-viewport {
  position: absolute;
  inset: 50px 75px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border-radius: 12px;
}
.pattern-lightbox-pan {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  pointer-events: auto;
  z-index: 1;
  overflow: hidden;
  border-radius: 12px;
  width: 100%;
  height: 100%;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='13' cy='13' r='10' fill='%23fff'/%3E%3Ccircle cx='13' cy='13' r='8' fill='none' stroke='%23333' stroke-width='2'/%3E%3Cline x1='19' y1='19' x2='28' y2='28' stroke='%23333' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='9' y1='13' x2='17' y2='13' stroke='%23333' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='13' y1='9' x2='13' y2='17' stroke='%23333' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 13 13, zoom-in;
}
.pattern-lightbox-pan img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transition: none;
  border-radius: 12px;
}
.pattern-lightbox.zoomed .pattern-lightbox-pan {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='13' cy='13' r='10' fill='%23fff'/%3E%3Ccircle cx='13' cy='13' r='8' fill='none' stroke='%23333' stroke-width='2'/%3E%3Cline x1='19' y1='19' x2='28' y2='28' stroke='%23333' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='9' y1='13' x2='17' y2='13' stroke='%23333' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 13 13, zoom-out;
}
.pattern-lightbox.zoomed .pattern-lightbox-pan img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
  object-fit: none;
}
.pattern-lightbox.zoomed .pattern-lightbox-viewport {
  touch-action: none;
}
.pattern-lightbox-pan video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: auto;
  flex-shrink: 0;
  cursor: default;
}
.pattern-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10002;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}
.pattern-lightbox-close:hover {
  background: #fff;
  transform: scale(1.05);
}
.pattern-lightbox-prev,
.pattern-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10002;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}
.pattern-lightbox-prev:hover,
.pattern-lightbox-next:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}
.pattern-lightbox-prev { left: 16px; }
.pattern-lightbox-next { right: 16px; }

.pattern-lightbox-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  display: flex;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
}
.pattern-lightbox-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}
.pattern-lightbox-dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.05);
}
.pattern-lightbox-dot.active {
  background: #fff;
}
.pattern-lightbox-dot-video {
  border-radius: 0;
  width: 0;
  height: 0;
  background: none !important;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.4);
  font-size: 0;
  line-height: 0;
  outline: none;
  position: relative;
  top: -1px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pattern-lightbox-dot-video:hover {
  background: none !important;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.7);
  transform: scale(1.15);
}
.pattern-lightbox-dot-video.active {
  background: none !important;
  border-color: transparent transparent transparent #fff;
}
@media (max-width: 767px) {
  .pattern-lightbox-viewport {
    inset: 0;
    border-radius: 0;
  }
  .pattern-lightbox-pan {
    border-radius: 0;
  }
  .pattern-lightbox-prev,
  .pattern-lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  .pattern-lightbox-prev { left: 8px; }
  .pattern-lightbox-next { right: 8px; }
  .pattern-lightbox-close {
    top: 10px;
    right: 10px;
  }
}

.pattern-description {
  margin: 1rem 0;
}
.pattern-description p,
.pattern-description h1,
.pattern-description h2,
.pattern-description h3,
.pattern-description h4,
.pattern-description h5,
.pattern-description h6,
.pattern-description ul,
.pattern-description ol {
  margin: 0 0 0.5rem !important;
}
.pattern-description p {
  margin: 0 0 0.5rem !important;
}
.pattern-description > *:last-child {
  margin-bottom: 0 !important;
}

/* Ссылки в контенте из WYSIWYG (блог, страницы, главная, паттерны) */
.page-content a:not(.pattern-card *):not(.share-btn),
.pattern-description a:not(.pattern-card *):not(.share-btn),
.hero-content a:not(.pattern-card *):not(.share-btn) {
  color: #30844f;
}
.page-content a:hover:not(.pattern-card *):not(.share-btn),
.pattern-description a:hover:not(.pattern-card *):not(.share-btn),
.hero-content a:hover:not(.pattern-card *):not(.share-btn) {
  text-decoration: underline;
}

/* Адаптивное видео из WYSIWYG (YouTube iframe от CKEditor embed) */
.page-content .cke_widget_embed,
.page-content .cke_widget_wrapper {
  width: 100% !important;
}
.page-content iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9;
  border: 0;
}
.page-content div[data-oembed-url] {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
}
.page-content div[data-oembed-url] iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: unset;
}

/* Share float panel (blog post page) */
.share-float {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.share-float.visible {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 900px) {
  .share-float { display: none; }
}

/* Share block */
.share-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.share-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted, #666);
  white-space: nowrap;
}
.share-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-card, #f5f5f5);
  border: 1px solid var(--color-border, #e0e0e0);
  color: #444;
  font-size: 1rem;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.share-btn:hover {
  background: var(--color-border, #e0e0e0);
  text-decoration: none !important;
  transform: scale(1.15);
}
.share-btn--pinterest { color: #e60023; }
.share-btn--pinterest:hover { background: #fde8eb; border-color: #e60023; }
.share-btn--facebook { color: #0866ff; }
.share-btn--facebook:hover { background: #e7eeff; border-color: #0866ff; }
.share-btn--reddit { color: #ff4500; }
.share-btn--reddit:hover { background: #fff0eb; border-color: #ff4500; }
.share-btn--email { color: #555; }
.share-btn--email:hover { background: #f0f0f0; border-color: #555; }
.share-btn--copy { color: #555; }
.share-btn--copy:hover { background: #f0f0f0; border-color: #555; }
.share-btn--copy.copied { color: #30844f; border-color: #30844f; background: #eaf5ee; }
