/* ========================================================================== */
/*                           CYRKOWY KALEJDOSKOP                             */
/*                   Minimalist, Responsive, Modern Flexbox CSS               */
/* ========================================================================== */

/*--------------------------- CSS RESET & NORMALIZE -------------------------*/
html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #F4EFE9;
  color: #232A34;
  min-height: 100vh;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
ul, ol {
  list-style: none;
}
button, input, textarea, select {
  font-family: inherit;
  font-size: 1em;
  outline: none;
  border: none;
  background: none;
}

/*==================== BRAND COLORS & TYPOGRAPHY ============================*/
:root {
  --color-primary: #232A34;
  --color-secondary: #D49F3D;
  --color-accent: #F4EFE9;
  --color-text: #232A34;
  --color-bg: #FFFFFF;
  --color-hover: #F0E7D8;
  --color-shadow: rgba(35, 42, 52, 0.10);
  --radius-s: 6px;
  --radius: 12px;
  --spacing-xs: 8px;
  --spacing-s: 16px;
  --spacing-m: 24px;
  --spacing-l: 32px;
  --spacing-xl: 48px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.5rem; margin-bottom: var(--spacing-m); }
h2 { font-size: 2rem; margin-bottom: var(--spacing-s); }
h3 { font-size: 1.25rem; margin-bottom: var(--spacing-xs); }
h4, h5, h6 { font-size: 1rem; }
p, li, label, input, textarea { font-family: var(--font-body); font-size: 1rem; color: var(--color-text); }
p { margin-bottom: var(--spacing-s); }
strong { font-weight: 700; }

@media (max-width: 600px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
}

/*---------------------------- CONTAINER & LAYOUT ---------------------------*/
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: var(--spacing-s);
  padding-right: var(--spacing-s);
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-m);
  align-items: flex-start;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

@media (max-width: 768px) {
  .container {
    padding-left: var(--spacing-xs);
    padding-right: var(--spacing-xs);
  }
  .section {
    padding: 32px 10px;
    margin-bottom: 32px;
  }
}

/*--------------------------- HEADER & NAVIGATION ---------------------------*/
header {
  background: var(--color-bg);
  border-bottom: 1px solid #ECE7E1;
  box-shadow: 0 2px 10px var(--color-shadow);
}
header .container {
  padding-top: var(--spacing-s);
  padding-bottom: var(--spacing-s);
}
header .content-wrapper {
  flex-direction: row;
  gap: var(--spacing-l);
  align-items: center;
  justify-content: space-between;
}
nav {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-m);
  align-items: center;
}
nav a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  padding: var(--spacing-xs) var(--spacing-s);
  border-radius: var(--radius-s);
  transition: background 0.2s, color 0.2s;
}
nav a:hover, nav a:focus {
  background: var(--color-hover);
  color: var(--color-secondary);
}
header a img {
  height: 46px;
  width: auto;
  display: block;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.24s, color 0.24s, box-shadow 0.18s;
  box-shadow: 0 2px 8px var(--color-shadow);
  border: none;
  text-align: center;
  outline: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-secondary);
  color: var(--color-bg);
}
.btn-primary:hover, .btn-primary:focus {
  background: #d1951f;
  color: var(--color-bg);
  box-shadow: 0 4px 16px var(--color-shadow);
}
.btn-secondary {
  background: var(--color-bg);
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--color-secondary);
  color: var(--color-bg);
}

/*--------------------------- MOBILE NAVIGATION -----------------------------*/
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  color: var(--color-primary);
  border: none;
  cursor: pointer;
  margin-left: var(--spacing-m);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  transition: color 0.24s;
  z-index: 50;
}

@media (max-width: 1024px) {
  nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu {
  position: fixed;
  top: 0; left: 0; height: 100vh; width: 100vw;
  background: var(--color-bg);
  box-shadow: 0 4px 32px rgba(35,42,52,.22);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(-100vw);
  transition: transform 0.42s cubic-bezier(.58,-0.01,.44,1.11);
  will-change: transform;
  padding: var(--spacing-l) var(--spacing-l) var(--spacing-xl);
}
.mobile-menu.active {
  transform: translateX(0);
  transition: transform 0.44s cubic-bezier(.58,-0.01,.44,1.11);
}
.mobile-menu-close {
  background: none;
  color: var(--color-primary);
  border: none;
  font-size: 2.2rem;
  cursor: pointer;
  align-self: flex-end;
  margin-bottom: var(--spacing-m);
  min-width: 44px;
  min-height: 44px;
  transition: color 0.24s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  color: var(--color-secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-l);
}
.mobile-nav a {
  font-family: var(--font-body);
  font-size: 1.3rem;
  color: var(--color-primary);
  padding: var(--spacing-s);
  border-radius: var(--radius);
  text-align: left;
  transition: background 0.2s, color 0.2s;
  min-width: 80vw;
  min-height: 48px;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-bg);
}
@media (min-width: 1025px) {
  .mobile-menu {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
}

/*----------------------------- HERO SECTION --------------------------------*/
.hero {
  background: var(--color-accent);
  padding: 60px 0 48px;
  box-shadow: 0 2px 12px var(--color-shadow);
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--spacing-l);
}
.hero .content-wrapper {
  align-items: center;
  gap: var(--spacing-m);
  padding: 0;
}
.hero h1 {
  color: var(--color-primary);
  margin-bottom: var(--spacing-s);
}
.hero p {
  color: var(--color-primary);
  max-width: 600px;
  margin-bottom: var(--spacing-m);
}
.hero .btn-primary {
  margin-top: var(--spacing-m);
}
@media (max-width: 768px) {
  .hero {
    padding: 38px 0 24px;
  }
  .hero .container {
    gap: var(--spacing-m);
  }
}

/*-------------------------- FEATURE / CARD GRIDS ---------------------------*/
.feature-grid, .card-container, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.card-container {
  gap: 24px;
}
.card {
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--color-shadow);
  margin-bottom: 20px;
  position: relative;
  padding: var(--spacing-l);
  transition: box-shadow 0.22s, transform 0.18s;
}
.card:hover {
  box-shadow: 0 6px 24px var(--color-shadow);
  transform: translateY(-2px) scale(1.01);
}
.feature-grid > div, .feature-item {
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--color-shadow);
  padding: var(--spacing-m);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  min-width: 220px;
  min-height: 170px;
  flex: 1 1 240px;
  margin-bottom: 20px;
  transition: box-shadow .21s, transform 0.18s;
}
.feature-grid > div:hover {
  box-shadow: 0 4px 16px var(--color-shadow);
  background: #FAF8F3;
  transform: translateY(-1px);
}
@media (max-width: 900px) {
  .feature-grid, .card-container, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
  .feature-grid > div {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
  }
}

/*------------------------ TEXT-IMAGE / FLEX SECTIONS -----------------------*/
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/*------------------------- TESTIMONIALS & TAGS -----------------------------*/
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #FFF;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: 0 2px 12px var(--color-shadow);
  border-left: 4px solid var(--color-secondary);
  max-width: 680px;
  transition: box-shadow .19s, transform .17s;
}
.testimonial-card:hover {
  box-shadow: 0 4px 20px var(--color-shadow);
  transform: translateY(-1.5px);
}
.testimonial-card blockquote {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary);
  font-style: italic;
  margin-bottom: 8px;
}
.testimonial-card p {
  margin: 0;
  color: var(--color-text);
  font-size: 0.98rem;
}

.tag, .category-tag, .fact {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-secondary);
  font-size: 0.95rem;
  padding: 2px 12px;
  border-radius: var(--radius-s);
  font-weight: 500;
  margin-top: 8px;
}
.category-tag {
  background: var(--color-secondary);
  color: var(--color-bg);
  margin-left: 10px;
  margin-bottom: 8px;
}
.fact {
  background: #f8efe1;
  color: var(--color-primary);
  margin-top: 8px;
}

.timeline span {
  display: inline-block;
  color: var(--color-secondary);
  background: var(--color-accent);
  border-radius: var(--radius-s);
  font-size: 0.93rem;
  padding: 2px 10px;
  margin-top: 6px;
}

/*------------------------ ARTICLE & LIST LAYOUTS ---------------------------*/
.article-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-m);
}
.article-list article {
  background: var(--color-bg);
  box-shadow: 0 2px 8px var(--color-shadow);
  border-radius: var(--radius);
  padding: var(--spacing-m);
  margin-bottom: 12px;
  transition: box-shadow 0.19s, transform 0.16s;
}
.article-list article:hover {
  box-shadow: 0 6px 24px var(--color-shadow);
  transform: translateY(-2px) scale(1.01);
}

.pagination {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-xs);
  justify-content: flex-start;
  margin-top: var(--spacing-l);
}
.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-s);
  background: var(--color-accent);
  color: var(--color-secondary);
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.17s;
}
.pagination a.active, .pagination a:hover, .pagination a:focus {
  background: var(--color-secondary);
  color: var(--color-bg);
}

/*------------------------- SEARCH BAR (ARTYKULY) ---------------------------*/
.search-bar {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  margin-top: var(--spacing-s);
  justify-content: center;
}
.search-bar input[type=search] {
  border-radius: var(--radius-s);
  border: 1px solid #ECE7E1;
  padding: 7px 14px;
  min-width: 180px;
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color .18s;
}
.search-bar input[type=search]:focus {
  border-color: var(--color-secondary);
}
.search-bar button {
  background: var(--color-secondary);
  color: var(--color-bg);
  border-radius: var(--radius-s);
  min-width: 38px;
  min-height: 38px;
  cursor: pointer;
  border: none;
  font-size: 1.3rem;
  transition: background .17s;
}
.search-bar button:hover, .search-bar button:focus {
  background: #d1951f;
}

/*---------------------------- FORM (NEWSLETTER) ----------------------------*/
.subscription-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-m);
  background: #fff;
  border-radius: var(--radius-s);
  box-shadow: 0 1px 4px var(--color-shadow);
  padding: var(--spacing-xs) var(--spacing-m);
}
.subscription-form label {
  font-size: 1rem;
  color: var(--color-primary);
  margin-right: var(--spacing-xs);
  font-weight: 500;
}
.subscription-form input[type=email] {
  padding: 7px 10px;
  border-radius: var(--radius-s);
  border: 1px solid #ece7e1;
  font-size: 1rem;
  margin-right: var(--spacing-xs);
  background: #fafafa;
  transition: border-color .14s;
}
.subscription-form input[type=email]:focus {
  border-color: var(--color-secondary);
}
.subscription-form button {
  padding: 9px 16px;
  background: var(--color-secondary);
  color: var(--color-bg);
  border-radius: var(--radius-s);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.17s;
}
.subscription-form button:hover, .subscription-form button:focus {
  background: #d1951f;
}
@media (max-width: 768px) {
  .subscription-form {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: var(--spacing-xs) var(--spacing-xs);
  }
}

/*------------------------------ CONTACT INFO -------------------------------*/
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.96rem;
  color: var(--color-text);
  margin-top: var(--spacing-m);
}
.contact-info img {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  height: 18px;
}

/*------------------------------ FOOTER -------------------------------------*/
footer {
  background: var(--color-bg);
  box-shadow: 0 -2px 10px var(--color-shadow);
  border-top: 1px solid #ECE7E1;
  margin-top: var(--spacing-xl);
}
footer .container {
  padding-top: var(--spacing-l);
  padding-bottom: var(--spacing-l);
}
footer .content-wrapper {
  flex-direction: row;
  gap: var(--spacing-l);
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
footer nav {
  flex-direction: column;
  gap: 9px;
}
footer nav a {
  font-size: 0.98rem;
  color: var(--color-primary);
  padding: 0 0 2px 0;
  border-radius: 0;
  transition: color 0.15s;
}
footer nav a:hover, footer nav a:focus {
  color: var(--color-secondary);
}

@media (max-width: 900px) {
  footer .content-wrapper {
    flex-direction: column;
    gap: var(--spacing-m);
    align-items: flex-start;
  }
}

/*------------------------- MODALS & BANNERS (COOKIE) -----------------------*/
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: #fff;
  box-shadow: 0 -2px 24px var(--color-shadow);
  padding: var(--spacing-m) var(--spacing-l);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-m);
  z-index: 1100;
  font-size: 1rem;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  transition: transform 0.32s cubic-bezier(.61,-0.02,.42,1.11), opacity 0.18s;
}
.cookie-banner.hide {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner p {
  color: var(--color-text);
  flex: 1 1 0%;
  margin-right: var(--spacing-m);
}
.cookie-buttons {
  display: flex;
  gap: 12px;
}
.cookie-banner button {
  padding: 8px 16px;
  font-size: 1rem;
  border-radius: var(--radius-s);
  border: none;
  font-family: var(--font-body);
  cursor: pointer;
  margin: 0;
  box-shadow: 0 1px 6px var(--color-shadow);
  transition: background .17s, color .17s;
}
.cookie-banner .accept {
  background: var(--color-secondary);
  color: var(--color-bg);
  font-weight: 500;
}
.cookie-banner .accept:hover, .cookie-banner .accept:focus {
  background: #d1951f;
}
.cookie-banner .reject {
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: 500;
}
.cookie-banner .reject:hover, .cookie-banner .reject:focus {
  background: #10151b;
}
.cookie-banner .settings {
  background: transparent;
  color: var(--color-secondary);
  font-weight: 500;
  border: 1px solid var(--color-secondary);
}
.cookie-banner .settings:hover, .cookie-banner .settings:focus {
  background: var(--color-secondary);
  color: var(--color-bg);
}
@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: var(--spacing-m) var(--spacing-xs);
    font-size: 0.95rem;
  }
}

/*-------------------------- COOKIE SETTINGS MODAL --------------------------*/
.cookie-modal {
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(35,42,52,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.29s;
}
.cookie-modal.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal-dialog {
  background: #fff;
  border-radius: var(--radius);
  max-width: 400px;
  width: 92vw;
  padding: var(--spacing-l);
  box-shadow: 0 6px 36px var(--color-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-m);
  position: relative;
  animation: cookieSlideIn .42s cubic-bezier(.52,-0.02,.31,1.05);
}
@keyframes cookieSlideIn {
  from { transform: translateY(42px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.cookie-modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin-bottom: var(--spacing-s);
  color: var(--color-primary);
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-s);
}
.cookie-category {
  background: var(--color-accent);
  border-radius: var(--radius-s);
  padding: var(--spacing-s);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
}
.cookie-category label {
  font-weight: 500;
  font-size: 1rem;
}
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.toggle-switch input[type=checkbox] {
  width: 36px;
  height: 20px;
  appearance: none;
  background: #dfdfdf;
  border-radius: 10px;
  position: relative;
  outline: none;
  transition: background 0.17s;
}
.toggle-switch input[type=checkbox]:checked {
  background: var(--color-secondary);
}
.toggle-switch input[type=checkbox]::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 100%;
  position: absolute;
  left: 2px;
  top: 2px;
  transition: left 0.23s;
}
.toggle-switch input[type=checkbox]:checked::before {
  left: 18px;
}

.cookie-modal-actions {
  display: flex;
  gap: 16px;
  margin-top: var(--spacing-m);
  justify-content: flex-end;
}
.cookie-modal-actions button {
  border-radius: var(--radius-s);
  border: none;
  background: var(--color-secondary);
  color: var(--color-bg);
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .17s, color .17s;
}
.cookie-modal-actions .secondary {
  background: var(--color-primary);
  color: var(--color-bg);
}
.cookie-modal-actions .secondary:hover,
.cookie-modal-actions .secondary:focus { background: #10141c; }
.cookie-modal-actions button:hover, .cookie-modal-actions button:focus {
  background: #d1951f;
}
.cookie-modal-close {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-secondary);
  cursor: pointer;
  transition: color .17s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--color-primary);
}

@media (max-width: 450px) {
  .cookie-modal-dialog { padding: var(--spacing-m); }
}

/*--------------------- MAP, PLACEHOLDER & RESPONSIVE IMAGE -----------------*/
.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  border-radius: var(--radius);
  min-height: 130px;
  margin-top: var(--spacing-s);
}

/*----------------------------- UTILITY CLASSES -----------------------------*/
.mt-l { margin-top: var(--spacing-l); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-l { margin-bottom: var(--spacing-l); }
.text-center { text-align: center; }
.flex-row { display: flex; flex-direction: row; }
.flex-col { display: flex; flex-direction: column; }
.align-center { align-items: center; }
.gap-m { gap: var(--spacing-m); }

/*------------------------ ADAPTIVE & RESPONSIVENESS ------------------------*/
@media (max-width: 900px) {
  .content-wrapper {
    gap: var(--spacing-m);
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 600px) {
  .card, .testimonial-card, .feature-grid > div, .article-list article {
    padding: var(--spacing-m);
    min-width: 0;
  }
  .contact-info {
    gap: 0;
    font-size: 0.93rem;
  }
}

/*------------------------ FORM ELEMENTS & FOCUS ----------------------------*/
input, textarea, select, button {
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-secondary);
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/*----------------------------- ACCESSIBILITY -------------------------------*/
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/*-------- Hide skip links visually unless focused --------*/
.skip-link {
  position: absolute;
  left: -9999px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
  z-index: 2000;
}
.skip-link:focus {
  position: static;
  width: auto; height: auto;
  left: auto;
  margin: var(--spacing-xs);
  padding: var(--spacing-xs);
  background: var(--color-accent);
  border-radius: var(--radius-s);
  color: var(--color-secondary);
}

/*------------------------------ END OF CSS ---------------------------------*/
