/* Master: one place for portfolio project blocks (index + case pages) */
.project-card-master {
  position: relative;
  transition: opacity 0.3s ease;
}

.project-card-master .project-image-container,
.project-card-master .project-image-container-tall,
.project-card-master .project-hero-card {
  transition:
    transform 0.4s cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 0.4s ease;
  border-radius: 20px;
}

.project-card-master .project-hero-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

/* Match media filling across all cards (Tailwind preflight img max-width/height:auto) */
.project-card-master .project-image-rect {
  position: relative;
  min-height: 0;
  transform: none;
  transition: none;
}

.project-card-master .project-image-rect:hover {
  transform: none;
  transition: none;
}

.project-card-master .project-image-media {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  display: block;
}

.header-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-main-copy {
  margin-top: 34px;
  width: 100%;
  flex-grow: 1;
}

.header-main-block {
  display: flex;
  height: 72px;
  align-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.btn-main {
  border-radius: 10px;
  background: #1a1919;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  transition: all 0.3s;
}

.btn-main:hover {
  background: #00d866;
}

.social-btn {
  display: flex;
  height: 48px;
  width: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1919;
  transition: all 0.3s;
}

.social-icon-hover {
  display: none;
}

.social-btn:hover .social-icon-default {
  display: none;
}

.social-btn:hover .social-icon-hover {
  display: block;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 64px;
}

.work-col {
  width: 100%;
  min-width: 0;
  flex: 1 1 0%;
}

.project-group {
  display: flex;
  flex-direction: column;
}

.project-group + .project-group {
  margin-top: 100px;
}

.project-image-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Внутри кейсов группы держат 2 колонки на всех размерах вплоть до мобильной версии */
.project-card-master .project-image-group {
  grid-template-columns: 1fr 1fr;
}

.project-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.work-link {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  transition: color 0.3s;
}

.work-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
  padding-bottom: 2px;
  position: relative;
}

.work-link-icon-hover {
  display: none;
}

.work-link:hover .work-link-default {
  display: none;
}

.work-link:hover .work-link-icon-hover {
  display: block;
}

.work-link:hover {
  color: #00d866;
}

.work-link-mobile-only {
  display: none;
}

@media (max-width: 640px) {
  .work-link-mobile-only {
    display: inline-flex;
  }
}

.project-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 690 / 550;
}

.project-image-container-tall {
  position: relative;
  width: 100%;
  aspect-ratio: 1400 / 872;
}

.project-image-rect {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: transparent;
  overflow: hidden;
}

.project-image-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-image-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: rgb(255 255 255 / 0.6);
}

.project-image-overlay-bottom {
  top: auto;
  bottom: 20px;
}

.project-image-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.project-image-meta {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.project-image-container .project-image-overlay {
  color: rgb(255 255 255 / 0.6);
  font-size: 14px;
  line-height: 14px;
}

.project-image-container .project-image-overlay .project-image-title,
.project-image-container .project-image-overlay .project-image-meta {
  font-size: 14px;
  line-height: 14px;
  color: inherit;
}

.project-image-container .project-image-overlay.project-image-overlay--on-light {
  color: rgb(30 30 30 / 0.6);
}

.footer-shell {
  background: #1e1e1e;
  padding: 0 0 32px;
}

.footer-row {
  display: flex;
  align-items: center;
}

.footer-copy {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
  flex: 0 0 auto;
}

.footer-privacy-link {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.footer-pill {
  display: flex;
  align-items: center;
  height: 66px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
}

.footer-social-btn {
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1919;
}

@media (min-width: 1351px) {
  .header-row {
    flex-wrap: nowrap;
  }

  .project-card-master .work-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 1350px) {
  .project-card-master .work-grid {
    grid-template-columns: 1fr;
    row-gap: 64px;
  }
}

/* Мобильная версия: группы картинок встают в одну колонку */
@media (max-width: 640px) {
  .project-card-master .project-image-group {
    grid-template-columns: 1fr;
  }
}
