/*
Theme Name: My Stone Fireplace
Theme URI: https://mystonefireplace.com
Author: Blackcedar
Author URI: https://mystonefireplace.com
Description: Pinterest-inspired masonry theme for MyStoneFireplace.com. Clean grid homepage, article layout, and immersive picture view with ratings.
Version: 1.6.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mystonefireplace
Tags: masonry, grid, blog, photography, clean, responsive
*/

/* Basic resets */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--mfp-body-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif) !important;
  font-size: var(--mfp-body-font-size, 16px);
  font-weight: var(--mfp-body-font-weight, 400);
  color: #1f1f1f;
  background: #f6f6f6;
}

h1{font-size:var(--mfp-h1-size,36px);line-height:1.15;margin:0 0 12px;}
h2{font-size:var(--mfp-h2-size,28px);line-height:1.2;margin:0 0 10px;}
h3{font-size:var(--mfp-h3-size,22px);line-height:1.25;margin:0 0 8px;}
h4{font-size:var(--mfp-h4-size,18px);line-height:1.3;margin:0 0 6px;}


a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout */
.mfp-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e7e7e7;
}

.mfp-topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mfp-brand {
  display: flex;
  align-items: center;
  min-width: 220px;
}

.mfp-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.mfp-brand-title {
  font-size: var(--mfp-brand-font-size);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mfp-nav {
  flex: 1;
}

.mfp-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.mfp-nav-list a {
  font-size: var(--mfp-menu-font-size);
  font-weight: 600;
  color: var(--mfp-menu-text-color);
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
}

.mfp-nav-list a:hover,
.mfp-nav-list .current-menu-item > a {
  background: #111;
  color: #fff;
}

.mfp-topbar-search {
  display: flex;
  justify-content: flex-end;
  min-width: 280px;
}

.mfp-search {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.mfp-search input[type="search"] {
  width: 320px;
  max-width: 45vw;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #dedede;
  background: #fafafa;
}

.mfp-search button {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.mfp-search button:hover {
  opacity: 0.92;
}

.site-main {
  max-width: 1240px;
  margin: 1.25rem auto 3rem;
  padding: 0 1.25rem;
}

/* Home: Highlights + Pinterest Wall */
.mfp-highlights {
  margin: 0 0 1.25rem;
}

.mfp-highlights-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mfp-highlight {
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 16px;
  padding: 1.05rem;
  box-shadow: 0 10px 22px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mfp-highlight:hover {
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
}

.mfp-highlight-title {
  font-weight: 800;
  font-size: 0.95rem;
}

.mfp-highlight-sub {
  font-size: 0.85rem;
  color: #444;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.mfp-highlight-metric {
  font-size: 0.78rem;
  color: #666;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #e7e7e7;
}

.mfp-highlight-media {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 0.7rem;
  align-items: stretch;
}

.mfp-highlight-hero {
  min-height: 240px;
}

.mfp-highlight-hero img,
.mfp-highlight-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.mfp-highlight-thumbs {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 0.45rem;
}

.mfp-media-fallback {
  width: 100%;
  height: 100%;
  min-height: 140px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f1f1f1, #e9e9e9);
}

.mfp-section-head {
  margin: 0.25rem 0 0.95rem;
}

.mfp-section-title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.mfp-section-subtitle {
  margin: 0.35rem 0 0;
  color: #666;
}

.mfp-badge {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background: #f2f2f2;
  color: #444;
  vertical-align: middle;
}

.mfp-home-intro {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.mfp-home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 1.25rem 0 0.9rem;
}

.mfp-home-section-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.mfp-home-pagination {
  margin-top: 1.75rem;
  text-align: center;
}

.mfp-home-pagination .page-numbers {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  margin: 0 0.15rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

.mfp-home-pagination .page-numbers.current,
.mfp-home-pagination a.page-numbers:hover {
  background: #222;
  color: #fff;
  border-color: #222;
}

/* Pinterest-style masonry wall */
.mfp-masonry {
  column-count: 4;
  column-gap: 1.05rem;
}

.mfp-pin {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 1.8rem;
}

.mfp-pin-link {
  display: block;
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.05);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.mfp-pin-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.08);
}

.mfp-pin-media {
  position: relative;
}

.mfp-pin-media img {
  width: 100%;
  height: auto;
  display: block;
}

.mfp-pin-title-overlay{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding: 14px 12px 10px;
  color:#fff;
  background: linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0));
}

.mfp-pin-title-overlay .mfp-pin-title{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size: 1.02rem;
}


.mfp-pin-hover {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: rgba(17,17,17,0.72);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.mfp-pin-link:hover .mfp-pin-hover {
  opacity: 1;
  transform: translateY(0);
}

.mfp-pin-body {
  padding: 0.65rem 0.85rem 0.85rem;
}

.mfp-pin-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.mfp-pin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #666;
  font-size: 0.78rem;
}

.mfp-pin-meta span {
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #ededed;
  background: #fafafa;
  white-space: nowrap;
}

.mfp-load-more {
  text-align: center;
  margin: 1.25rem 0 0;
}

.mfp-load-more-btn {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 700;
}

.mfp-load-more-btn:hover {
  opacity: 0.92;
}

/* Keep 4 columns on most desktops; drop to 3 a bit later */
@media (max-width: 960px) {
  .mfp-masonry { column-count: 3; }
}

@media (max-width: 820px) {
  .mfp-highlights-inner { grid-template-columns: 1fr; }
  .mfp-masonry { column-count: 2; }
  .mfp-topbar-inner { flex-wrap: wrap; }
  .mfp-brand { min-width: 0; }
  .mfp-topbar-search { min-width: 0; width: 100%; }
  .mfp-search input[type="search"] { width: 100%; max-width: 100%; }
}

@media (max-width: 520px) {
  .mfp-masonry { column-count: 1; }
}

/* Latest posts grid (2 columns desktop, 1 column mobile) */
.mfp-latest-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.05rem;
  align-items: start;
}

.mfp-latest-item{
  width: 100%;
}

.mfp-latest-item .mfp-pin-link{
  height: 100%;
}

@media (max-width: 640px) {
  .mfp-latest-grid{ grid-template-columns: 1fr; }
}

/* Single post + photo grid */
.mfp-article-head {
  margin: 0 0 1rem;
}

.mfp-article-title {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.mfp-article-submeta {
  margin-top: 0.35rem;
  color: #666;
  font-size: 0.9rem;
}

.mfp-single-hero img {
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.12);
}

.mfp-article-content {
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 10px 22px rgba(0,0,0,0.05);
  margin-top: 1rem;
}

.mfp-photo-grid-wrap {
  margin-top: 1.25rem;
}

.mfp-section-title-sm {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.mfp-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}

.mfp-photo img {
  border-radius: 14px;
  border: 1px solid #ededed;
}

/* Attachment rating */
.mfp-attachment-media img {
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.12);
}

.mfp-back {
  display: inline-block;
  margin-top: 0.5rem;
  color: #444;
}

.mfp-rating {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: 0 10px 22px rgba(0,0,0,0.05);
}

.mfp-stars {
  display: flex;
  gap: 0.35rem;
  font-size: 1.35rem;
}

.mfp-star {
  color: #b7b7b7;
}

.mfp-star.is-active,
.mfp-star.is-hover {
  color: #111;
}

.mfp-rating-average {
  margin-top: 0.35rem;
  color: #666;
  font-size: 0.9rem;
}

/* Single article */
.single-article-header {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.2fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.single-article-hero img {
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.16);
}

.single-article-meta {
  align-self: center;
}

.single-article-title {
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

.single-article-meta .meta-line {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.25rem;
}

.single-article-content {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.single-article-gallery {
  margin-top: 2.5rem;
}

.single-article-gallery h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.single-article-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
}

/* Picture view (attachment) */
.picture-view-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr);
  gap: 2rem;
}

.picture-view-main img {
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.17);
}

.picture-view-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.picture-view-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.picture-view-meta .meta-label {
  font-size: 0.85rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.picture-view-meta .meta-value {
  font-size: 0.95rem;
}

/* Rating stars */
.mfp-rating {
  margin-top: 0.75rem;
}

.mfp-rating-label {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.25rem;
}

.mfp-stars {
  display: inline-flex;
  gap: 0.15rem;
  cursor: pointer;
}

.mfp-star {
  font-size: 1.3rem;
  color: #e0e0e0;
  transition: color 0.2s ease;
}

.mfp-star.is-active,
.mfp-star.is-hover {
  color: #f6b200;
}

.mfp-rating-average {
  font-size: 0.85rem;
  color: #555;
  margin-left: 0.5rem;
}

.mfp-rating-message {
  font-size: 0.8rem;
  color: #007c4f;
  margin-top: 0.25rem;
}

/* Related pictures */
.picture-related-section {
  margin-top: 3rem;
}

.picture-related-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.picture-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.picture-related-item {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

/* Footer */
.site-footer {
  border-top: 1px solid #e0e0e0;
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--mfp-footer-text, #888);
  background: var(--mfp-footer-bg, #ffffff);
}

/* Responsive tweaks */
@media (max-width: 960px) {
  .single-article-header,
  .picture-view-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .site-main {
    padding: 0 0.75rem;
  }

  .mfp-topbar-inner {
    padding: 0.55rem 0.75rem;
  }

  .single-article-title {
    font-size: 1.6rem;
  }
}

/* === Card Readability Improvements === */
.masonry-card { margin-bottom: 12px; }
.card-title {
  font-size: var(--mfp-card-title-size, 16px);
  font-weight: var(--mfp-card-title-weight, 700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
  padding: 12px;
}
.card-meta i { margin-right: 6px; }

/* Header Controls (Customizer vars) */
.mfp-brand,
.mfp-brand a {
  font-size: var(--mfp-brand-font-size, 18px);
}

.mfp-nav a,
.mfp-topbar a {
  color: var(--mfp-menu-text-color, #111);
  font-size: var(--mfp-menu-font-size, 15px);
}



/* Typography: Post/Picture Titles */
.mfp-post-title {
  font-size: var(--mfp-post-title-size, var(--mfp-h1-font-size, 36px));
  font-weight: var(--mfp-post-title-weight, 700);
}
.mfp-picture-title {
  font-size: var(--mfp-picture-title-size, var(--mfp-h1-font-size, 36px));
  font-weight: var(--mfp-picture-title-weight, 700);
}