/**
 * Card lists and single pages built in PHP (template-parts/card.php, card-list.php, single-*.php).
 * Same look as the Elementor news lists (news-lists.css): square image left, text right.
 */

:root {
  --sm-wrap-width: 1340px;
  --sm-wrap-narrow: 900px;

  --sm-card-thumb: 220px;
  --sm-card-gap: 30px;

  --sm-ink: var(--e-global-color-5d07d29, #191919);
  --sm-muted: var(--e-global-color-1a5727f, #616161);
  --sm-gold: var(--e-global-color-bc24dfb, #bc8d37);
}

@media (max-width: 1024px) {
  :root {
    --sm-card-thumb: 160px;
  }
}

@media (max-width: 767px) {
  :root {
    --sm-card-thumb: 100px;
    --sm-card-gap: 16px;
  }
}

/* ---------- page wrapper ---------- */

.sm-wrap {
  width: 100%;
  max-width: var(--sm-wrap-width);
  margin: 0 auto;
  padding: 100px 10px 90px;
  box-sizing: border-box;
}

.sm-wrap--narrow {
  max-width: var(--sm-wrap-narrow);
}

@media (max-width: 767px) {
  .sm-wrap {
    padding: 50px 20px 50px;
  }
}

/* ---------- category links ---------- */

.sm-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-bottom: 50px;
}

body .sm-filter a {
  font-family: "Muli Bold", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--sm-ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

body .sm-filter a:hover,
.sm-filter a.is-active {
  color: var(--sm-gold);
  border-bottom-color: var(--sm-gold);
}

/* ---------- cards ---------- */

.sm-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 50px;
  align-items: start;
}

@media (max-width: 767px) {
  .sm-cards {
    grid-template-columns: 1fr;
  }
}

.sm-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sm-card-gap);
}

.sm-card__thumb {
  position: relative;
  display: block;
  flex: 0 0 var(--sm-card-thumb);
  width: var(--sm-card-thumb);
  aspect-ratio: 1;
  overflow: hidden;
  /* placeholder, covered by the image when there is one */
  background: url("../img/sm-monogram.png") center / 52% no-repeat, #f5efe3;
}

.sm-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.sm-card__text {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.sm-card .sm-card__title {
  margin: 0 0 15px;
  font-family: "Muli Bold", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sm-ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

@media (max-width: 767px) {
  .sm-card .sm-card__title {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

body .sm-card__title a {
  font: inherit;
  color: inherit;
  text-decoration: none;
}

.sm-card__meta {
  margin-bottom: 15px;
  font-family: "Muli Regular", sans-serif;
  font-size: 12px;
  color: var(--sm-muted);
}

.sm-card__excerpt p {
  margin: 0 0 15px;
  font-family: "Muli Regular", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--sm-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

body .sm-card__more {
  margin-top: auto;
  font-family: "Muli SemiBold", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--sm-gold);
  text-decoration: none;
}

/* ---------- pagination (WordPress: .navigation.pagination .nav-links) ---------- */

.sm-list .pagination {
  margin-top: 50px;
}

.sm-list .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
}

.sm-list .nav-links a {
  color: var(--sm-ink);
  text-decoration: none;
}

.sm-list .nav-links .current {
  font-weight: 700;
}

.sm-empty {
  text-align: center;
  padding: 40px 0;
}

/* ---------- single page ---------- */

.sm-single__meta {
  margin: 0 0 30px;
  font-size: 13px;
  color: var(--sm-muted);
}

body .sm-single__meta a {
  color: var(--sm-gold);
  text-decoration: none;
}

/* the YouTube player: full width, 16:9 */
.sm-single__content iframe,
.sm-single__content .wp-block-embed__wrapper iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  margin-bottom: 30px;
}

.sm-single__content .wp-block-embed {
  margin: 0 0 30px;
}

.sm-single__back {
  margin-top: 50px;
}

body .sm-single__back a {
  color: var(--sm-gold);
  text-decoration: none;
  font-family: "Muli SemiBold", sans-serif;
  text-transform: uppercase;
  font-size: 14px;
}

/* body text of a single page: comfortable reading size */
.sm-single__content {
  font-family: "Muli Regular", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--sm-ink);
}

.sm-single__content p {
  margin: 0 0 1.2em;
}

/* ---------- rows ("Prireditve" style: media left, text right) ---------- */

:root {
  --sm-row-media: 260px;
  --sm-row-gap: 40px;
}

@media (max-width: 1024px) {
  :root {
    --sm-row-media: 200px;
    --sm-row-gap: 30px;
  }
}

@media (max-width: 767px) {
  :root {
    --sm-row-media: 110px;
    --sm-row-gap: 16px;
  }
}

.sm-rows {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.sm-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sm-row-gap);
}

.sm-row__media {
  position: relative;
  display: block;
  flex: 0 0 var(--sm-row-media);
  width: var(--sm-row-media);
  aspect-ratio: 1;
  overflow: hidden;
  background: url("../img/sm-monogram.png") center / 52% no-repeat, #f5efe3;
}

.sm-row__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* play icon on thumbnails that stand for a video */
.sm-row__media.has-video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(25, 25, 25, 0.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") 55% 50% / 42% no-repeat;
  transition: background-color 0.2s;
}

.sm-row__media.has-video:hover::after {
  background-color: var(--sm-gold);
}

@media (max-width: 767px) {
  .sm-row__media.has-video::after {
    width: 36px;
    height: 36px;
  }
}

.sm-row__text {
  flex: 1 1 0;
  min-width: 0;
}

.sm-row__meta {
  margin-bottom: 8px;
  font-family: "Muli Regular", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #54595f;
}

.sm-row__category {
  margin-bottom: 12px;
  font-family: "Muli Regular", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body .sm-row__category a {
  font: inherit;
  color: var(--sm-gold);
  text-decoration: none;
}

.sm-row .sm-row__title {
  margin: 0 0 15px;
  font-family: "Muli Regular", sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--sm-ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

body .sm-row__title a {
  font: inherit;
  color: inherit;
  text-decoration: none;
}

.sm-row__excerpt p {
  margin: 0;
  font-family: "Muli Regular", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #7a7a7a;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

@media (max-width: 767px) {
  .sm-row .sm-row__title {
    font-size: 20px;
    line-height: 1.35;
  }

  .sm-row__excerpt p {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* ---------- category links in a menu drawer ([sm_term_links]) ---------- */

.sm-menu-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

body .sm-menu-links a {
  /* same as the sub-links in the Prireditve drawer: Muli SemiBold 500, 15px */
  font-family: "Muli SemiBold", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--sm-ink);
  text-decoration: none;
}

body .sm-menu-links a:hover {
  color: var(--sm-gold);
}

/* ---------- links keep their size on hover ----------
 * The Elementor kit restyles EVERY link on :hover (`.elementor-kit-N a:hover`, specificity 0,2,1)
 * with its own font size, which made our links jump. Same idea as .matica-menu-links in the
 * Customizer CSS: say it again for the hover state, one step more specific. */

body .sm-card__title a:hover,
body .sm-row__title a:hover,
body .sm-row__category a:hover {
  font: inherit;
}

body .sm-filter a:hover {
  font-family: "Muli Bold", sans-serif;
  font-size: 14px;
}

body .sm-card__more:hover,
body .sm-single__back a:hover {
  font-family: "Muli SemiBold", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

body .sm-menu-links a:hover {
  font-family: "Muli SemiBold", sans-serif;
  font-size: 15px;
  font-weight: 500;
}

/* ---------- bold link in a menu drawer ([sm_latest_link]), same look as the drawer buttons ---------- */

body a.sm-menu-button,
body a.sm-menu-button:hover {
  font-family: "Muli Bold", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
  text-decoration: none;
}

body a.sm-menu-button {
  color: var(--sm-ink);
  transition: color 0.3s;
}

body a.sm-menu-button:hover {
  color: var(--sm-gold);
}
