main {
  margin-top: 70px;
}

.consultants {
  margin: 16px 0;
}

.consultants img {
  height: auto !important;
}

.consultant {
  width: 24vw;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.consultants img {
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  width: 100%;
}

.consultants h4 {
  font-size: 20px;
  color: var(--light);
  font-weight: 300;
  font-family: "Syne", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
}

.consultants p {
  font-family: "Futurapt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 20px;
  line-height: 24px;
  font-weight: 300;
  color: var(--light);
}

h2 {
  font-size: 20px;
  color: var(--light);
}

.margin {
  margin-bottom: 40px;
}

.blog__title {
  border-bottom: 1px solid var(--light);
  padding: 10px 0;
}

.about {
  margin: 70px auto;
}

.about img {
  transform: scale(1.2) !important;
}

.split-layout {
  justify-content: center;
  justify-items: center;
}

.about__left {
  flex: 2; /* Ліва частина займає доступний простір */
}

.about__right {
  flex: 1; /* Права частина займає таку ж висоту, як ліва */
  display: flex;
  align-items: center; /* Центруємо вміст по вертикалі */
}

.about__right img {
  max-height: 400px;
}

/* Posts grid layout - 4 per row by default */
.posts-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
  position: relative;
  overflow: visible;
}

.post-preview {
  display: block;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: visible;
  background: transparent;
  border-radius: 8px;
  padding: 0;
  z-index: 1;
}

.post-preview:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.post-image {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin-bottom: 8px;
  transition: opacity 0.2s ease;
}

/* Educational materials - 2:3 aspect ratio */
#educational + .posts-list .post-image {
  aspect-ratio: 2/3;
}

.post-preview:hover .post-image {
  opacity: 0.9;
}

.post-preview h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--light);
  line-height: 1.3;
  font-family: "Futurapt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  /* Обмеження до 3 рядків за замовчуванням */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: calc(1.3em * 3);

  transition: all 0.3s ease;
}

/* На hover розкриваємо повний текст */
.post-preview:hover h3 {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  height: auto;
  overflow: visible;
}

/* Додаємо дату під заголовком на hover */
.post-preview:hover::after {
  content: attr(data-date-formatted);
  display: block;
  font-size: 13px;
  color: #888;
  margin-top: 8px;
  font-family: "Futurapt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 300;
}

.post-preview h3 a {
  color: inherit;
  text-decoration: none;
}

.post-preview h3 a:hover {
  color: #ffffff;
}

/* Hide excerpt and date for grid layout */
.post-excerpt,
.post-date {
  display: none;
}

/* Category blocks */
.category-block {
  margin-bottom: 48px;
}

.category-block:last-child {
  margin-bottom: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

.margin {
  margin-bottom: 40px;
}

.partners {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin: 80px 0;
}

.partners__image-part {
  flex: 1;
  display: flex;
  height: 100%;
  justify-content: center;
  align-items: center;
  padding-top: 40px;
}

.partners__text-part {
  flex: 7;
  display: flex;
  flex-direction: column;
}

.partners-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-transform: uppercase;
}

.partners__image-part img {
  max-width: 100%;
}

.partner {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--light);
}

.partner a,
.partner a:hover,
.partner a:visited {
  font-size: 20px;
  text-decoration: none;
  color: var(--light);
}

.nav-plain {
  text-align: center;
  margin: 2rem 0 0.5rem 0;
  font-size: 0.95rem;
  color: #666;
}

.nav-plain a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-plain a:hover {
  color: #b1b1b1;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .about {
    display: flex;
    flex-direction: column-reverse;
    gap: 20px;
  }

  .about img {
    max-height: 200px;
    transform: scale(1) !important;
  }

  .about__left,
  .about__right {
    flex: none;
    width: 100%;
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  .about__right img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }

  .consultants {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Posts grid - 1 per row on mobile phones with simplified display */
  .posts-list {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 16px 0;
  }

  .post-preview {
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: auto; /* Remove min-height restriction */
  }

  .post-preview h3 {
    font-size: 15px;
    /* Show full titles on mobile by default */
    -webkit-line-clamp: unset;
    line-clamp: unset;
    height: auto;
    overflow: visible;
    margin-bottom: 8px;
  }

  .post-preview::after {
    content: attr(data-date-formatted) !important;
    display: block !important;
    font-size: 13px;
    color: #888;
    margin-top: 4px;
    font-family: "Futurapt", -apple-system, BlinkMacSystemFont, "Segoe UI",
      Roboto, sans-serif;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 300;
  }

  .post-preview:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.02);
  }

  /* Disable card clone on mobile */
  .card-clone {
    display: none !important;
  }

  .footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .footer__nav-column {
    text-align: center;
  }

  .partners {
    gap: 0;
  }

  .partners__image-part {
    flex: 0;
    visibility: hidden;
  }
}

/* Tablet - 3 per row */
@media (min-width: 769px) and (max-width: 1199px) {
  .posts-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .post-preview h3 {
    font-size: 15px;
  }
}

/* Small desktop - 4 per row (default) */
@media (min-width: 1200px) and (max-width: 1919px) {
  .posts-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .post-preview h3 {
    font-size: 16px;
  }
}

/* Large desktop - 6 per row from 1920px */
@media (min-width: 1920px) {
  .posts-list {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
}

.card-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.card-clone {
  cursor: pointer;
}

.card-clone .post-image {
  border-radius: 8px 8px 0 0;
}

.post-preview:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
  z-index: 1;
}

.post-preview:hover h3 {
  -webkit-line-clamp: 3;
  line-clamp: 3;
  height: calc(1.3em * 3);
  overflow: hidden;
}

.post-preview:hover::after {
  content: none;
}

.card-clone {
  padding: 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-clone .post-image {
  width: 100%;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
}

.card-clone h3 {
  padding: 10px;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--light);
  line-height: 1.3;
  font-family: "Futurapt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-date {
  font-size: 13px;
  color: #888;
  padding: 0 10px 10px;
  font-family: "Futurapt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 300;
}

.post-preview.content-hidden h3,
.post-preview.content-hidden::after {
  opacity: 0;
}

.post-preview.content-hidden .post-image {
  opacity: 0;
}

.post-preview {
  min-height: 200px;
}

.card-clone {
  padding: 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background-color: rgba(30, 30, 30, 0.95);
}
