/*
 Theme Name:  ColorMag Child
 Template:    colormag
 Version:     1.0
*/

/* Featured (first) post full width */
.cm-featured { margin-bottom: 24px; }
.cm-featured .cm-thumb img { width:100%; height:auto; display:block; }

/* Grid: rest in 2 columns */
.cm-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.cm-grid .cm-thumb img { width:100%; height:auto; display:block; }

/* Responsive */
@media (max-width: 782px) {
  .cm-archive-grid { grid-template-columns: 1fr; }
}

@media screen and (min-width: 768px) {
	#header-logo-image {
	  position: absolute;
    margin-top: 8px;
		z-index: 9999;
	}
	
	.custom-logo {
		width: 238px !important;
	}
	
	.colormag-header-classic #header-text-nav-wrap {
		padding-top: 0px !important;
	}
	
	.colormag-header-classic .menu-primary-container {
		display: flex;
    justify-content: flex-end;
	}
}

@media screen and (max-width: 768px) {
	#header-logo-image {
    position: absolute;
    left: 0;
    right: 0;
    margin-inline: auto;
    width: 50%;
	}
}

.single #content .post {
	box-shadow: none !important;
}

.new-blog-title-center {
	font-size: 65px;
	line-height: 4.1675rem;
	font-weight: 700;
	margin-left: auto;
	margin-right: auto;
	display: inline-block;
	color: #393e41;
	text-align: center;
	text-transform: uppercase;
	margin-top: .8335rem;
	max-width: 80%;
  margin: 0 auto;
}

@media screen and (max-width: 768px) {
	.new-blog-title-center {
		font-size: 1.611rem !important;
    line-height: 1.667rem;
	}
}

/* New Blog Template layout */
#primary.template-new-blog, #primary.template-new-blog #secondary {
	width: 100%;
}

.template-new-blog .nbt-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px; /* content | sidebar */
  gap: 32px;
}

/* Make sure the title area breathes */
.template-new-blog .nbt-entry-header {
  margin: 12px 0 24px;
	text-align: center;
}

/* Keep images responsive inside content */
.template-new-blog .entry-content img {
  max-width: 100%;
  height: auto;
}

/* Responsive: stack on small screens */
@media (max-width: 992px) {
  .template-new-blog .nbt-wrap {
    grid-template-columns: 1fr;
  }
  .template-new-blog .nbt-sidebar {
    order: 2;
  }
}

.title-image-line-div {
	text-align: center;
	margin-bottom: 20px;
	margin-top: -22px;
}

.title-image-line-div img {
	object-fit: contain;
  height: 60px;
}

/* Float-based wrap: image left, text wraps */
.template-new-blog .nbt-hero-media {
  float: left;
  width: 320px;
  max-width: 45%;
  margin: 0 28px 16px 0;
}

.template-new-blog .nbt-hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;    /* optional */
}

.template-new-blog .nbt-clear { clear: both; }

/* Prevent blocks from breaking the wrap unless they are wide/full */
.template-new-blog .entry-content > * {
  max-width: 100%;
}

/* Mobile: stack image above text */
@media (max-width: 900px) {
  .template-new-blog .nbt-hero-media {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 16px;
  }
}

.nbt-sidebar,
.main-content-section > #secondary,
#main .inner-wrap > #secondary {
  background-color: #f9f9f7;
  padding: 25px 22px 70px;
}

/* Sidebar box with background */
.nbt-sidebar-box {
  border-radius: 8px;
  margin-bottom: 24px;
}

/* Latest Posts: image left, title right */
.nbt-sidebar-box.wp-block-latest-posts__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.nbt-sidebar-box.wp-block-latest-posts__featured-image {
  flex: 0 0 auto;
}

.nbt-sidebar-box .wp-block-latest-posts__featured-image img {
  width: 100px;
  height: 100px;
  max-width: 100px;
  object-fit: cover;
  border-radius: 4px;
}

.nbt-sidebar-box.wp-block-latest-posts__post-title {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.3;
  color: #333;
}

.nbt-sidebar-box.wp-block-latest-posts__post-title:hover {
  text-decoration: underline;
}

.sidebar-widget-title {
  color: rgb(133, 57, 255);
  font-size: 1rem;
  line-height: 1.667rem;
  font-weight: 700;
  margin-top: 0;
  position: relative;
  margin-bottom: -24px;
}

.sidebar-widget-title:after {
  bottom: -7.5015px;
  background-color: #E2D4FF;
  content: "";
  display: block;
  height: 3px;
  position: absolute;
  width: 55px;
  top: 30px;
}

/* CTA container with background image */
.nbt-sidebar-cta {
  background: url('https://staging.astroideal.com/blog/wp-content/uploads/2025/09/tarot-top.jpg')
              center/cover no-repeat;
  border-radius: 12px;
  padding: 28px 16px; /* spacing for text inside */
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* push text/button toward the bottom */
  min-height: 380px; /* adjust based on image height */
  color: #fff;
  position: relative;
  overflow: hidden;
}

.nbt-sidebar-cta.prof-signup {
  background: url('https://staging.astroideal.com/blog/wp-content/uploads/2025/09/prof-join.jpg')
              center/cover no-repeat;
}

/* Optional dark overlay for text readability */
.nbt-sidebar-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  /* background: linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0.6)); */
  z-index: 0;
}

.nbt-sidebar-cta p {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 0 2px 5px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

.nbt-sidebar-cta.prof-signup {
  color: rgb(133, 57, 255);
}

.nbt-cta-button {
  display: inline-block;
  background: rgb(133, 57, 255);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.85rem;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.nbt-cta-button:hover {
  background: rgba(133, 57, 255, 0.85);
}

.archive #content .cm-archive-grid.category .post:nth-child(2n),
.archive #content .cm-archive-grid.category .post:nth-child(2n+1) {
  width: 100%;
}

/* Title bar styling */
.nbt-archive-hero {
  text-align: center;
  padding: 30px 0 20px;
  margin: 0;
}

.nbt-archive-title {
  position: relative;
  z-index: 0;
  font-size: 65px;
  line-height: 4.1675rem;
  font-weight: 700;
  margin-left: auto;
  margin-right: auto;
  display: inline-block;
  color: #393e41;
  text-align: center;
  text-transform: uppercase;
  margin-top: .8335rem;
  max-width: 80%;
}

@media screen and (max-width: 768px) {
	.nbt-archive-title {
		font-size: 1.611rem !important;
    line-height: 1.667rem;
	}
}

.nbt-archive-rule {
  margin: 12px auto 0;
  width: min(760px, 100%);
  height: 10px;
  background-image: radial-gradient(#9aa3ad 3px, transparent 4px);
  background-size: 22px 10px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: .9;
}

.title-image-line-div.category {
  margin-top: 0px;
}

/* Restore two-column layout */
.article-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px; /* space between cards */
}

.article-container article {
  flex: 1 1 calc(50% - 15px);
  box-sizing: border-box;
}

/* Force posts to stack on mobile */
@media (max-width: 768px) {
  .article-container {
    display: block; /* disables the flex row layout */
  }

  .article-container article {
    width: 100% !important;
    max-width: 100%;
    margin: 0 0 20px; /* add some space between posts */
  }
}

/* 1. Remove box shadow from post cards */
.article-container article {
  box-shadow: none !important;
  border: none;
}

/* 2. Add a thin black border around the featured image */
.article-container article .featured-image img {
  border: 1px solid #000;
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
}

.article-container .entry-content .more-link span {
  padding: 12px 17px;
  font-size: .8889rem;
  line-height: 1.3336rem;
  font-weight: 400;
}

/* ---------- Title Styling & Alignment ---------- */
.article-container article .entry-title {
  font-size: 1.611rem !important;
  line-height: 1.667rem !important;

  /* Clamp titles to 2 lines & align heights */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;         /* 2 lines on desktop */
  min-height: calc(2 * 1.667rem); /* reserve space for two lines */
  margin-bottom: 15px;
}

/* Mobile: allow 3 lines if you want more readable titles on small screens */
@media (max-width: 768px) {
  .article-container article .entry-title {
    line-clamp: 3;
    min-height: calc(3 * 1.667rem);
  }
}

/* ---------- GLOBAL CARD STYLING (Latest + Category) ---------- */
.article-container article,
.blog article,
.archive article {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: none !important;
  background: none !important;
}

/* ---------- TITLE STYLING & ALIGNMENT ---------- */
.article-container article .entry-title,
.blog article .entry-title,
.archive article .entry-title {
  font-size: 1.611rem !important;
  font-weight: 700;
  line-height: 1.667rem !important;
  margin: 0 0 -0.8335rem !important;
  padding-left: 0;           /* reset any theme padding */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;      /* Clamp to 2 lines */
  min-height: calc(2 * 1.667rem);
}

/* ---------- IMAGE BORDER ---------- */
.article-container .post-thumbnail,
.blog .post .post-thumbnail,
.archive .post .post-thumbnail {
  border: 1px solid #000 !important;
  box-sizing: border-box;
}

/* ---------- READ MORE BUTTON POSITION ---------- */
.article-container article .entry-content,
.blog article .entry-content,
.archive article .entry-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: 1rem;
}

.article-container article .entry-content a.read-more-button,
.blog article .entry-content a.read-more-button,
.archive article .entry-content a.read-more-button,
.article-container article .entry-content a.more-link,
.blog article .entry-content a.more-link,
.archive article .entry-content a.more-link {
  align-self: flex-start;
  margin-top: 1.2rem !important; /* consistent spacing from title */
  width: auto;
  display: inline-block;
  text-align: center;
}

/* ---------- GRID LAYOUT ---------- */
.article-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}
.article-container article {
  flex: 1 1 calc(50% - 15px);
}

@media (max-width: 768px) {
  .article-container { display: block; }
  .article-container article {
    width: 100% !important;
    margin-bottom: 20px;
  }
}

.article-content {
  padding: 15px;
}

.archive.category .article-content {
  padding-top: 0px;
  padding-bottom: 0px;
}

.archive.category .article-content .entry-title {
  margin-bottom: -30px !important;
}

.nbt-cat-cloud-wrap {
  text-align: center;
}

.nbt-cat-cloud-wrap a {
  display: inline-block;
  margin: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #f9f9f7;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  text-decoration: none;
  transition: 0.2s ease-in-out;
}

.nbt-cat-cloud-wrap a:hover {
  border-color: rgb(133, 57, 255);
  background: #fff;
  color: rgb(133, 57, 255);
}

/* Shared */
.vd-news-banner { margin: 0 0 28px; }
.vd-news-banner .inner-wrap { max-width: 100%; margin: 0 auto; padding: 0 20px; }
.vd-banner-head h2 { margin: 0 0 6px; font-size: 32px; line-height: 1.25; color: #2d2d2d; margin-bottom:0px; }
.vd-banner-head p  { margin: 0 0 18px; font-style: italic; color: #2d2d2d; opacity: .95; }
.vd-news-banner.vd--contained { background:#eaeaea; padding:22px 0 24px; border-radius:4px; }

/* MailPoet form tidy */
.vd-news-banner .mailpoet_form { display:flex; flex-wrap:wrap; gap:10px; max-width:100%; }
.vd-news-banner .mailpoet_form input[type="email"],
.vd-news-banner .mailpoet_form input[type="text"] { flex:1 1 260px; padding:12px 14px; border:1px solid #ccc; border-radius:8px; background:#fff; }
.vd-news-banner .mailpoet_form input[type="submit"] { padding:12px 20px; border:0; border-radius:10px; font-weight:700; background:#b10077; color:#fff; cursor:pointer; }

/* --- Banner container --- */
.vd-news-banner.vd--contained {
  background: rgb(246 236 253);     /* lilac background */
  padding: 24px 0 0;
  border-radius: 12px;
  margin: 0 0 28px;
  text-align: center;               /* center heading & form */
  width: 75%;
  margin: 0 auto;
  margin-bottom: 20px;
  margin-top: 20px;
}

.vd-news-banner .inner-wrap {
  max-width: 100%;                   /* <<< new: limit to 70% width */
  margin: 0 auto;
  padding: 0 20px;
}

/* Headings */
.vd-banner-head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  color: #2d2d2d;
}
.vd-banner-head p {
  margin: 0 0 20px;
  font-style: italic;
  color: #2d2d2d;
  opacity: .95;
}

/* Form layout (centered) */
.vd-news-banner .mailpoet_form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.vd-news-banner .mailpoet_form input[type="text"],
.vd-news-banner .mailpoet_form input[type="email"] {
  flex: 1 1 300px;
  max-width: 260px;
  height: 52px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
}

.vd-news-banner .mailpoet_form input[type="submit"],
.vd-news-banner .mailpoet_submit {
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #751FFF;              /* purple button */
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform .02s ease, filter .15s ease;
}

.vd-news-banner .mailpoet_form input[type="submit"]:hover,
.vd-news-banner .mailpoet_submit:hover {
  filter: brightness(1.07);
}

.vd-news-banner .mailpoet_form input[type="submit"]:active,
.vd-news-banner .mailpoet_submit:active {
  transform: translateY(1px);
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
  .vd-news-banner .inner-wrap { max-width: 100%; }
  .vd-news-banner .mailpoet_form {
    flex-direction: column;
    align-items: stretch;
  }
  .vd-news-banner .mailpoet_form input,
  .vd-news-banner .mailpoet_form input[type="submit"],
  .vd-news-banner .mailpoet_submit,
  .vd-news-banner.vd--contained {
    width: 100%;
  }

  .vd-news-banner .mailpoet_form input[type="email"] {
    width: 100% !important;
    max-width: 100%;
    margin-bottom: 0px;
  }
}
