/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: white;
  color: #222;
  line-height: 1.6;
}


.language-switcher {
  text-align: right;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.language-switcher a {
  margin-left: 8px;
  margin-right: 8px;
}
.language-switcher .active {
  margin: 0 8px;
  color: #888;
  cursor: default;
  text-decoration: none;
}

.highlight {
  background: #f9f9f9;
  padding: 10px;
  border-left: 3px solid #d7dff7;
  margin-bottom: 20px;
}

.decorated-section {
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

.decorated-section::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  right: -100vw;
  background: url('') repeat-y center;
  background-size: contain;
  opacity: 1;
  z-index: -1;
}
/*адаптив+*/
@media (max-width: 768px) {
  .full-width-bg > .decorated-section {
    padding: 40px 15px;
  }

  .decorated-section::before {
    background-size: cover;
    left: -50vw;
    right: -50vw;
  }
}

@media (max-width: 480px) {
  .full-width-bg > .decorated-section {
    padding: 30px 10px;
  }

  .decorated-section::before {
    background-size: cover;
    left: -25vw;
    right: -25vw;
  }
}
/*адаптив-*/
.full-width-bg {
  background-color: #f5f7fa;
  width: 100%;
}

.full-width-bg > .decorated-section {
  padding: 60px 20px;
  max-width: 960px;
  margin: 0 auto;
}
.notemark {
display: table;
padding: 5px 8px;
border-radius: 6px;
background-color: #f5f5f5;
margin-bottom: 10px;
font-weight: 500;
font-size: 14px;
}

.overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 10;
justify-content: center;
align-items: center;
cursor: pointer;
overflow: auto;
padding: 0;
}

#fullscreenImageContainer {
display: flex;
justify-content: center;
align-items: flex-start;
max-width: 100%;
max-height: 100%;
height: auto;
}

.overlay img {
margin-top: 8px;
max-width: 96%;
max-height: 100%;
border-radius: 12px;
object-fit: contain;
}

.screenshot-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  overflow: visible;
}
.screenshot-grid2 img {
    max-width: 100%;
    height: auto;
}

.screenshot-grid4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  overflow: visible;
}
.screenshot-grid4 img {
    max-width: 100%;
    height: auto;
}

.zoomable {
  transition: transform 0.3s ease;
}

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

.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.scroll-to-top:hover {
  opacity: 1;
  border-color: #aaa;
}

.notion-b-links {
display: flex;
gap: 12px;
justify-content: center;
align-items: center;
transition: max-height 0.3s ease;
}

.notion-b-links a {
padding: 6px 14px;
border: 1px solid #37352f29;
border-radius: 6px;
color: rgba(55, 53, 47, 0.8);
text-decoration: none;
font-size: 14px;
background-color: white;
transition: all 0.15s ease-in-out;
}

.notion-b-links a:hover {
background-color: #37352F0F;
}

.notion-b-links a:active {
transform: scale(0.97);
}

ul {
  padding-left: 20px;
  list-style: none;
}

ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background-color: #d7dff7;
  border-radius: 50%;
}

/* Layout */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1em;
}

.upcontainer {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  margin-bottom: -20px;
}

.center {
  text-align: center;
}

.section {
  padding: 3em 0;
}

.light {
  background-color: #f9f9f9;
}

/* Header */
.header {
  border-bottom: 1px solid #eee;
  padding: 1em 0;
}

.logo {
  text-align: center;
  width: 100%;
  font-size: 1.8em;
  font-weight: bold;
}

.nav {
  display: flex;
  gap: 1.5em;
  font-size: 0.95em;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

/* Header 2 */

  .top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid #37352f29;
    background-color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    flex-wrap: wrap;
    max-width: 960px;
    margin: 0 auto;
  }
  
  .logo-img {
    width: 66.3px;
    height: 30px;
    border-radius: 4%;
    object-fit: cover;
  }
  
  .burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .burger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #37352fcc;
    transition: 0.3s ease;
  }

  .burger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .burger.open span:nth-child(2) {
    opacity: 0;
  }

  .burger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .nav-links {
    display: flex;
    gap: 12px;
    transition: max-height 0.3s ease;
  }

  .nav-links a {
    padding: 6px 14px;
    border: 1px solid #37352f29;
    border-radius: 6px;
    color: rgba(55, 53, 47, 0.8);
    text-decoration: none;
    font-size: 14px;
    background-color: white;
    transition: all 0.15s ease-in-out;
  }

  .nav-links a:hover {
    background-color: #37352F0F;
  }

  .nav-links a:active {
    transform: scale(0.97);
  }


/* Hero */
.hero {
  padding: 4em 1em;
  background-color: #f4f7fe;
}

.hero h2 {
  font-size: 2.2em;
  margin-bottom: 0.5em;
}

.hero p {
  color: #555;
  margin-bottom: 1.5em;
}

    .welcome-message {
      font-family: 'Segoe UI', sans-serif;
      font-size: 18px;
      line-height: 1.6;
      color: #333;
      background-color: #f9f9f9;
      padding: 25px;
      border-radius: 12px;
      max-width: 700px;
      margin: 0 auto;
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    
    .welcome-message .greeting {
      font-size: 22px;
      font-weight: 600;
      margin-bottom: 15px;
      color: #1a1a1a;
    }
    
    .welcome-message .motto {
      text-align: right;
    }
    
    .welcome-message .motto1 {
      margin: 25px 0;
      font-style: italic;
      font-weight: 500;
      color: #555;
    }
    
    .welcome-message .signature {
      margin-top: 20px;
    }
    
    .welcome-message .author {
      font-weight: 600;
      color: #006666;
    }
    
    .welcome-message .note {
      font-size: 11px;
      color: #888;
      margin-top: 10px;
      text-align: right;
    }
    
    .inlinks {
      color: inherit;
    }
    
    a.inlinks {
      text-decoration: none;
      color: inherit;
      padding: 0.6px 0.6px;
      border-radius: 6px;
      transition: color 0.2s ease;
      word-break: break-all;
      overflow-wrap: break-word;
    }
    
    a.inlinks:hover {
      color: #006666;
    }

@media (max-width: 600px) {
  .hero {
    font-size: 91%;
  }
}

/* Buttons */
.button {
  background-color: #2563eb;
  color: white;
  padding: 0.75em 1.5em;
  border-radius: 0.75em;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: #1e40af;
}

.button.small {
  padding: 0.5em 1em;
  font-size: 0.9em;
  margin-top: 1em;
  border: 1px solid #ddd;
  border-radius: 0.5em;
  background-color: #fff;
  color: #111;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.button.small:hover {
  background-color: #f4f4f4;
  border-color: #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Categories */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
  margin-top: 1em;
}

.category-cta {
  font-size: 1.1em;
  color: #444;
  margin-bottom: 1em;
  text-align: center;
}

.tag {
  background: #eee;
  padding: 0.4em 0.8em;
  border-radius: 1em;
  font-size: 0.9em;
  display: inline-block;
  margin: 0.2em;
  white-space: nowrap;
}

.tag a {
  color: #333;
  text-decoration: none;
  position: relative;
  padding: 0;
  display: inline-block;
}

.tag a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: #bbb;
  transition: width 0.3s ease;
}

.tag a:hover::after {
  width: 100%;
}

@media (max-width: 480px) {
  .tag {
    font-size: 0.8em;
    padding: 0.3em 0.6em;
    margin-bottom: 0.7em;
  }
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2em;
  margin-top: 2em;
}

.card {
  border: 1px solid #ddd;
  border-radius: 1em;
  padding: 1em;
  text-align: center;
  background: white;
  width: 100%;
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0.5em;
  margin-bottom: 1em;
}

/*Всі шаблони*/

.template-button-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -60px auto 60px auto;
}

.template-btn {
  position: relative;
  background-color: #fff;
  color: #222;
  font-size: 1.1rem;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.template-btn:hover {
  background-color: #fff;
}

.emoji {
  position: absolute;
  opacity: 0;
  font-size: 24px;
  pointer-events: none;
}

/* Різні позиції та висоти */
.emoji1 { left: 10%; top: -80px; }
.emoji2 { left: 25%; top: -100px; }
.emoji3 { left: 40%; top: -60px; }
.emoji4 { left: 55%; top: -90px; }
.emoji5 { left: 70%; top: -120px; }
.emoji6 { left: 85%; top: -70px; }
.emoji7 { left: 50%; top: -110px; }

/* Анімація запускається при наведенні */
.template-btn:hover .emoji1 {
  animation: rain 2.2s ease forwards;
}
.template-btn:hover .emoji2 {
  animation: rain 2.4s ease forwards;
}
.template-btn:hover .emoji3 {
  animation: rain 1.9s ease forwards;
}
.template-btn:hover .emoji4 {
  animation: rain 2.6s ease forwards;
}
.template-btn:hover .emoji5 {
  animation: rain 2.3s ease forwards;
}
.template-btn:hover .emoji6 {
  animation: rain 1.8s ease forwards;
}
.template-btn:hover .emoji7 {
  animation: rain 2.4s ease forwards;
}

@keyframes rain {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(100px) rotate(360deg);
    opacity: 0;
  }
}


@keyframes fall {
  0% {
    top: -50px;
    opacity: 0;
    transform: translateX(-50%) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) rotate(20deg);
  }
  100% {
    top: 50%;
    opacity: 0;
    transform: translateX(-50%) rotate(360deg);
  }
}

/* Blog */
.blog-list {
  list-style: none;
  margin-top: 1.5em;
}

.blog-list li {
  margin-bottom: 1.5em;
}

.blog-list span {
  color: #666;
  font-size: 0.9em;
}

/*Всі статті блогу*/

.blog-button-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -20px auto -16px auto;
}

.blog-btn {
  position: relative;
  background-color: #f9f9f9;
  color: #222;
  font-size: 1.1rem;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.blog-btn:hover {
  background-color: #f9f9f9;
}

.emoji {
  position: absolute;
  opacity: 0;
  font-size: 24px;
  pointer-events: none;
}

/* Різні позиції та висоти */
.emoji1 { left: 10%; top: -80px; }
.emoji2 { left: 25%; top: -100px; }
.emoji3 { left: 40%; top: -60px; }
.emoji4 { left: 55%; top: -90px; }
.emoji5 { left: 70%; top: -120px; }
.emoji6 { left: 85%; top: -70px; }
.emoji7 { left: 50%; top: -110px; }

/* Анімація запускається при наведенні */
.blog-btn:hover .emoji1 {
  animation: rain 2.2s ease forwards;
}
.blog-btn:hover .emoji2 {
  animation: rain 2.4s ease forwards;
}
.blog-btn:hover .emoji3 {
  animation: rain 1.9s ease forwards;
}
.blog-btn:hover .emoji4 {
  animation: rain 2.6s ease forwards;
}
.blog-btn:hover .emoji5 {
  animation: rain 2.3s ease forwards;
}
.blog-btn:hover .emoji6 {
  animation: rain 1.8s ease forwards;
}
.blog-btn:hover .emoji7 {
  animation: rain 2.4s ease forwards;
}

@keyframes rain {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(100px) rotate(360deg);
    opacity: 0;
  }
}


@keyframes fall {
  0% {
    top: -50px;
    opacity: 0;
    transform: translateX(-50%) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) rotate(20deg);
  }
  100% {
    top: 50%;
    opacity: 0;
    transform: translateX(-50%) rotate(360deg);
  }
}

/* CTA */

.cta-section {
  background: linear-gradient(135deg, #f4f7fe 0%, #ece9ff 100%);
  text-align: center;
  padding: 60px 20px;
  border-radius: 16px;
  margin: 60px auto 0;
  max-width: 800px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.cta-section.show {
  opacity: 1;
  transform: translateY(0);
}

.cta-button {
  display: inline-block;
  background: #ece9ff; /* ніжно-лавандовий фон */
  color: #4b4b6b; /* глибокий фіолетово-сірий текст */
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 24px;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.cta-button:hover {
  background: #d7d3ff; /* трохи темніший відтінок при наведенні */
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Category */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.template-card {
  max-width: 480px;
  width: 100%;
  background: #f8f8f9;
  margin: 0 auto;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
  border: 1px solid #eae6df;
}

.template-card:hover {
  transform: translateY(-6px);
  border: 1px solid #e0e0e5;
}

.template-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.template-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
}

.template-card p {
  flex-grow: 1;
  font-size: 0.95rem;
  color: #444;
}

.button-cat.small {
  display: block;
  margin: 1em auto 0 auto;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
  padding: 0.5em 1em;
  font-size: 0.9em;
  margin-top: 1em;
  border: 1px solid #ddd;
  border-radius: 0.5em;
  background-color: #f7f7fa;
  color: #111;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.button-cat.small:hover {
  background-color: #f4f4f4;
  border-color: #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Footer */
.footer {
  padding: 2em 0;
  border-top: 1px solid #eee;
  font-size: 0.85em;
  color: #777;
}

.section {
  padding: 3em 0;
}
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1em;
}

.prefooter {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: space-between;
}

.footer-section {
  flex: 1 1 200px;
}

.section-title {
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #666666;
  display: flex;
  align-items: center;
  margin-bottom: 0.5em;
}

.triangle {
  margin-right: 10px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #666666;
  transition: transform 0.3s ease;
}

.triangle.open {
  transform: rotate(180deg);
}

.section-content {
  display: none;
  margin-top: 10px;
  padding-left: 20px;
}

.section-content a {
  display: block;
  color: #444444;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 5px;
}

.section-content a:hover {
  text-decoration: underline;
}


/*links*/
a {
  text-decoration: none;
  color: inherit;
  padding: 0.6em 1.2em;
  display: inline-block;
  position: relative;
}

/* === Стиль для першого посилання === */
.border-hover::before,
.border-hover::after,
.border-hover .line-top,
.border-hover .line-left {
  content: "";
  position: absolute;
  background-color: #bbb;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.border-hover .line-top {
  height: 2px;
  width: 0;
  top: 0;
  left: 0;
}

.border-hover::after {
  height: 2px;
  width: 0;
  bottom: 0;
  right: 0;
}

.border-hover .line-left {
  width: 2px;
  height: 0;
  top: 0;
  left: 0;
}

.border-hover::before {
  width: 2px;
  height: 0;
  bottom: 0;
  right: 0;
}

.border-hover:hover::before,
.border-hover:hover::after {
  height: 2px;
  width: 100%;
}

.border-hover:hover .line-left,
.border-hover:hover .line-top {
  height: 100%;
  width: 2px;
}

    @media (max-width: 640px) {
      .top-bar {
        position: fixed;
        height: 60px;
        margin-top:-16px;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        background-color: white;
      }
      
      .scroll-to-top {
        width: 36px;
        height: 36px;
        bottom: 16px;
        right: 16px;
        z-index: 1100;
      }

    
      body {
        padding-top: 64px;
      }
        
      .burger {
        display: flex;
      }
    
      .nav-links {
        flex-direction: column;
        width: 90%;
        transform: translate(-5%, -20px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s ease, opacity 0.35s ease;
        position: absolute;
        top: 64px;
        left: 5%;
        background-color: #f5f5f4;
        z-index: 1000;
        border-top: 1px solid #37352f29;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      }
    
      .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
      }
    
      .nav-links a {
        width: 100%;
        text-align: center;
        padding: 12px 0;
        border-bottom: 1px solid #37352fcc;
      }
      .button-cat.small {
        width: 100%;
        text-align: center;
      }
    }

@media (max-width: 768px) {
  .nav {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75em;
    justify-content: center;
  }

  .header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1em;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 1.5em;
  }

  .hero p {
    font-size: 1em;
  }
  
  .cards {
    grid-template-columns: 1fr;
  }  
  
    .screenshot-grid2 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
    .screenshot-grid4 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
}

@media (max-width: 900px) {
  .card img {
    height: auto;
  }
}

@media (hover: hover) and (pointer: fine) {
  .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  }
}


/* === Субкатегорії === */

.subcategory-nav {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.subcategory-btn {
  background: #eee;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.3s;
}
.subcategory-btn:hover,
.subcategory-btn.active {
  background: #ccc;
}

.swipe-hint {
  display: none;
}

@media (max-width: 768px) {
  .swipe-hint {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: #888;
    margin-right: 1rem;
    margin-bottom: 0.25rem;
  }
}

/*адаптив+*/
@media (max-width: 768px) {
  .template-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .template-card {
    margin: 0 auto;
    padding: 1rem;
  }

  .template-card h3 {
    font-size: 1.1rem;
  }

  .template-card p {
    font-size: 0.9rem;
  }

.subcategory-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  justify-content: flex-start;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  padding-right: 0.5rem;
}
.subcategory-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.subcategory-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #eee;
  border: none;
  transition: background 0.3s;
  margin-right: 0;
}

.subcategory-btn:hover,
.subcategory-btn.active {
  background: #ccc;
}
}

@media (max-width: 480px) {
  .template-card {
    padding: 0.75rem;
  }

  .template-card h3 {
    font-size: 1rem;
  }

  .template-card p {
    font-size: 0.85rem;
  }

  .button-cat.small {
    width: 100%;
    font-size: 0.95rem;
    padding: 0.75em;
  }
}

/*формули Notion*/
    .notion-formula-block {
      position: relative;
      margin: 2em 0;
      background-color: #f7f7f7;
      border: 1px solid #ccc;
      border-radius: 8px;
      overflow: auto;
      padding: 1em;
      font-family: Consolas, Menlo, Monaco, monospace;
      color: #1c1a1a;
      white-space: pre-wrap;
      word-break: break-all;
    }
    
    .notion-formula-block pre {
      margin: 0;
      white-space: pre-wrap;
      word-wrap: break-word;
      overflow-x: auto;
    }
    
    .notion-formula-block code {
      display: block;
      font-size: 14px;
      background: transparent;
      color: #333;
      line-height: 1.5;
      white-space: pre-wrap;
    }
    
    .copy-btn {
      position: absolute;
      top: 0.5em;
      right: 0.5em;
      background: #f7f7f7;
      color: #fff;
      border: none;
      padding: 0.3em 0.6em;
      border-radius: 5px;
      cursor: pointer;
      font-size: 0.9em;
      z-index: 1;
      transition: background 0.2s ease;
    }
    
    .copy-btn:hover {
      background: #666;
    }
    
    /*Генератор документів з БД Notion - вибір файлу темплейта*/
    .custom-file-upload {
      display: inline-block;
      background: #fafafa;     /* світліше ніж у кнопки Продовжити */
      font-size: 13px;
      color: #444;
      border: 1px solid #ddd;
      padding: 4px 6px;
      border-radius: 4px;
      cursor: pointer;
      transition: background 0.2s ease;
      margin-right: 10px;
    }
    
    .custom-file-upload:hover {
      background: #f0f0f0;
    }
    
    .custom-file-upload.disabled {
      background: #fdfdfd;
      color: #aaa;
      border-color: #eee;
    }
    
    .file-name {
      font-size: 13px;
      color: #666;
      vertical-align: middle;
      transition: all 0.2s ease;
    }
    
    .file-name.active {
      color: #222;
      font-weight: bold;
    }
    
    input[type="file"] {
      display: none; /* ховаємо стандартний інпут */
    }