/* Projects page */

.projects-page {
  margin-top: 60px;
}

.projects-page__wrapper h1 {
  margin-bottom: 32px;
}

  /* Tab Navigation Styles */
  .projects-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    padding-bottom: 0;
  }
  .tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: #545454;
    background-color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    margin-bottom: 16px;
  }
  .tab-button:hover { color: #ff7017; background-color: #fff; }
  .tab-button.active { background-color: var(--accent-color, #FF8C42); color: #fff; }
  .tab-button.active:hover { background-color: #ff7017; }

  @media (max-width: 768px) {
    .projects-tabs { gap: 4px; }
    .tab-button { padding: 10px 16px; font-size: 13px; }
  }

  /* Filtering helpers */
  .project-item { transition: opacity 0.3s ease; }
  .project-item.hidden { display: none; }
  .featured-projects.no-visible-items { display: none; }

  /* Featured cards (from your file) */
  .featured-projects { margin-bottom: 80px; }
  .featured-projects__grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 30px; margin-bottom: 60px;
  }
  @media (max-width: 1200px) {
    .featured-projects__grid { grid-template-columns: 1fr; gap: 20px; }
  }
.featured-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 4px 20px rgba(0,0,0,.08);
  display:flex;
  /* gap:16px; */
  overflow:hidden;
  min-height:280px;
  transition:transform .3s ease, box-shadow .3s ease;
}
.featured-card:hover{ transform:translateY(-4px); box-shadow:0 8px 30px rgba(0,0,0,.12); }

.featured-card__image{
  flex:1 1 0;               /* 50% */
  position:relative;
  overflow:hidden;
  background:#2a2a2a;
}
.featured-card__image img{ width:100%; height:100%; object-fit:cover; }

.featured-card__content{
  flex:1 1 0;               /* 50% */
  padding:30px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.featured-card__title{ font-size:24px; font-weight:700; line-height:1.3; margin-bottom:12px; color:#373741; }
.featured-card__subtitle{ font-size:14px; color:#888; margin-bottom:16px; text-transform:uppercase; letter-spacing:.5px; }
.featured-card__description{ font-size:16px; line-height:1.3; color:#5a5a66; margin-bottom:20px; }

/* Детали: два равных столбца */
.featured-card__details{
  display:grid;
  grid-template-columns: 1fr 1fr;  /* два равных столбца */
  column-gap:16px;
  row-gap:12px;
  padding:20px;
  background:#fafafa;
  border:1px solid #eee;
  border-radius:12px;
}

/* строка «растворяется», чтобы label и value были ячейками grid */
.featured-card__detail{ display:contents; }

.featured-card__detail-label{
  grid-column:1;
  align-self:start;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#777e8a;
  line-height:1.3;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
  hyphens:auto;
}

.featured-card__detail-value{
  grid-column:2;
  align-self:start;
  font-size:14px;
  line-height:1.3;
  color:#373741;
  /* без max-width — чтобы столбец не схлопывался */
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
  hyphens:auto;
}

/* Мобильная версия */
@media (max-width:768px){
  .featured-card{ flex-direction:column; min-height:auto; }
  .featured-card__image{ flex:none; height:200px; }
  .featured-card__content{ padding:20px; }
  .featured-card__title{ font-size:20px; }
  .featured-card__description{ font-size:14px; }

  /* по-прежнему два равных столбца */
  .featured-card__details{ grid-template-columns: 1fr 1fr; }
}


/* Projects preview */

.projects-preview {
  margin-top: 20px;
  border-top: 1px solid transparent;
  padding-top: 50px;
}

@media screen and (max-width:440px) {
  .projects-preview {
    padding-top: 10px;
  }
}

.projects-preview__wrapper {
  margin-bottom: 80px;
}

.projects-preview__items-wrapper {
  width: 100%;
  display: grid;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-line-pack: start;
  align-content: start;
  column-gap: 32px;
  row-gap: 80px;
  grid-template: auto/repeat(auto-fill, minmax(30%, 1fr));
}

@media screen and (max-width:1820px) {
  .projects-preview__items-wrapper {
    column-gap: 28px;
    row-gap: 60px;
    grid-template: auto/repeat(auto-fill, minmax(28%, 1fr));
  }
}

@media screen and (max-width:1040px) {
  .projects-preview__items-wrapper {
    grid-template: auto/repeat(auto-fill, minmax(46%, 1fr));
  }
}

@media screen and (max-width:600px) {
  .projects-preview__items-wrapper {
    row-gap: 40px;
  }
}

@media screen and (max-width:400px) {
  .projects-preview__items-wrapper {
    grid-template: auto/repeat(auto-fill, minmax(100%, 1fr));
  }
}

.projects-preview__item {
  display: flex;
  flex-direction: column;
  max-width: 540px;
}

@media screen and (max-width: 560px) {
  .projects-preview__item {
    max-width: 100%;
  }
}

.projects-preview__item--index-page-last-item {
  display: none;
}

@media screen and (max-width: 1050px) {
  .projects-preview__item--index-page-last-item {
    display: flex;
  }
}

.projects-preview__item-slider {
  height: 100%;
  border-radius: 20px;
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  -ms-border-radius: 20px;
  -o-border-radius: 20px;
  overflow: hidden;
  max-height: 300px;
}

.projects-preview__item-img-wrapper {
  width: 100%;
  max-width: 540px;
  height: auto;
}

@media screen and (max-width: 580px) {
  .projects-preview__item-img-wrapper {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

.projects-preview__item-img {
  width: 100%;
  height: auto;
}

.projects-preview__item-heading {
  font-weight: bold;
  font-size: 24px;
  line-height: 36px;
  color: #373741;
  margin-top: 18px;
  margin-bottom: 6px;
  padding-right: 30px;
}

@media screen and (max-width: 1600px) {
  .projects-preview__item-heading {
    font-size: 18px;
    line-height: 1.4;
    margin-top: 18px;
    margin-bottom: 12px;
    padding-right: 0;
  }
}

@media screen and (max-width: 520px) {
  .projects-preview__item-heading {
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 8px;
  }
}

.projects-preview__item-text {
  font-size: 18px;
  line-height: 28px;
  color: #373741;
  padding-right: 30px;
}

@media screen and (max-width: 1600px) {
  .projects-preview__item-text {
    font-size: 16px;
    line-height: 1.4;
    padding-right: 0;
  }
}

@media screen and (max-width: 520px) {
  .projects-preview__item-text {
    font-size: 14px;
  }
}

.projects__notes {
  display: inline-block;
  margin-top: 80px;
  margin-bottom: 24px;
  padding: 32px;
  background-color: #fff;
  border-left: 6px solid var(--accent-color);
  width: auto;
}

.projects__notes span {
  font-weight: 600;
}

@media screen and (max-width: 520px) {
  .projects__notes {
    display: inline-block;
    margin-top: 60px;
    margin-bottom: 14px;
    padding: 24px;
  }
}


/* Карточки появляются снизу вверх */
@media (prefers-reduced-motion: no-preference) {
  .reveal{
    opacity:0;
    transform: translateY(40px);
    transition:
      opacity .45s ease-out,                 /* было ~.55s */
      transform .55s cubic-bezier(.22,.61,.36,1); /* было ~.65s */
    will-change: opacity, transform;
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.is-visible{
    opacity:1;
    transform: translateY(0);
  }
}
