/*
Theme Name: Construction Corner Blog
Theme URI: https://constructioncorner.id/blog/
Author: Construction Corner
Description: Custom WordPress theme for the Construction Corner blog, matched to the native Construction Corner website.
Version: 1.0.1
Text Domain: construction-corner-blog
*/

.post-cover.has-image,
.article-cover.has-image {
  padding: 0;
  overflow: hidden;
  background: #eef3ef;
}
.post-cover.has-image img,
.article-cover.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-content img {
  border-radius: 16px;
  height: auto;
}
.article-content a {
  color: #1b5941;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-content ul,
.article-content ol {
  color: #55655d;
  padding-left: 24px;
}
.article-content li + li {
  margin-top: 7px;
}
.article-content h3 {
  font-size: 21px;
  margin-top: 28px;
}
.article-content figure {
  margin: 30px 0;
}
.article-content figcaption {
  color: #7a8982;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}
.cc-pagination {
  margin-top: 36px;
}
.cc-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cc-pagination .page-numbers {
  min-width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dfe7e2;
  border-radius: 10px;
  padding: 0 12px;
  color: #143a2c;
  font-weight: 700;
  font-size: 13px;
  background: #fff;
}
.cc-pagination .page-numbers.current {
  background: #143a2c;
  color: #fff;
  border-color: #143a2c;
}
.cc-empty {
  border: 1px solid #e5eae7;
  border-radius: 18px;
  padding: 28px;
  background: #fff;
}

/* Related articles */
.cc-related-posts,
.cc-related-posts *,
.cc-related-posts *::before,
.cc-related-posts *::after {
  box-sizing: border-box;
}

.cc-related-posts {
  width: min(960px, calc(100% - 40px));
  margin: 52px auto 64px;
  padding-top: 30px;
  border-top: 1px solid #e3e8e5;
}

.cc-related-heading {
  margin-bottom: 20px;
}

.cc-related-heading span {
  display: block;
  margin-bottom: 5px;
  color: #b97a10;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cc-related-heading h2 {
  margin: 0;
  color: #143a2c;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
}

.cc-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.cc-related-card {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe7e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 58, 44, .04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cc-related-card:hover {
  transform: translateY(-3px);
  border-color: #c8d7cf;
  box-shadow: 0 14px 32px rgba(20, 58, 44, .08);
}

.cc-related-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef3ef;
  text-decoration: none;
}

.cc-related-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc-related-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #143a2c;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.cc-related-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 17px 18px;
}

.cc-related-category {
  display: block;
  margin-bottom: 8px;
  color: #b37711;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cc-related-content h3 {
  margin: 0 0 14px;
  color: #143a2c;
  font-size: 15px;
  line-height: 1.45;
}

.cc-related-content h3 a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.cc-related-content h3 a:hover {
  color: #276650;
}

.cc-related-link {
  margin-top: auto;
  color: #143a2c;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.cc-related-link:hover {
  color: #276650;
}

@media (max-width: 820px) {
  .cc-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .cc-related-posts {
    width: calc(100% - 28px);
    margin-top: 42px;
    margin-bottom: 48px;
    padding-top: 24px;
  }

  .cc-related-grid {
    grid-template-columns: 1fr;
  }
}

/* Article share */
.cc-share,
.cc-share *,
.cc-share *::before,
.cc-share *::after {
  box-sizing: border-box;
}

.cc-share {
  width: min(960px, calc(100% - 40px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid #e3e8e5;
}

.cc-share-heading {
  margin-bottom: 12px;
  color: #143a2c;
  font-size: 13px;
  font-weight: 800;
}

.cc-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.cc-share-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #d9e3de;
  border-radius: 12px;
  background: #fff;
  color: #143a2c;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.cc-share-btn:hover {
  transform: translateY(-1px);
  border-color: #adc4b8;
  background: #f5f8f6;
  color: #143a2c;
}

.cc-share-btn:focus-visible {
  outline: 3px solid rgba(20, 58, 44, .2);
  outline-offset: 2px;
}

.cc-share-btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: currentColor;
}

.cc-share-whatsapp {
  border-color: #143a2c;
  background: #143a2c;
  color: #fff;
}

.cc-share-whatsapp:hover {
  border-color: #1b5941;
  background: #1b5941;
  color: #fff;
}

.cc-copy-link.is-copied {
  border-color: #c9a65a;
  background: #fff8e8;
}

@media (max-width: 580px) {
  .cc-share {
    width: calc(100% - 28px);
    margin-top: 28px;
    padding-top: 20px;
  }

  .cc-share-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-share-btn {
    width: 100%;
  }
}

