/* ==========================================================================
1. Global Typography & Core Variables
   ========================================================================== */
:root {
  --primary-color: #5a4a42;
  --dusty-violet: #c8a2b3;
  --soft-gold: #b8860b;
}

body, 
.widget-title, 
.emmaknitty-table th, 
.emmaknitty-table td { 
  font-family: 'Jost', sans-serif !important; 
}

/* Global Link Cleanup */
a, a:hover, a:focus, a:active { 
  text-decoration: none !important; 
  border-bottom: none !important; 
  box-shadow: none !important; 
}

/* Updated Hover with Dusty Violet Logo Color (#c8a2b3) */
a:hover,
.primary-menu li a:hover {
  color: #c8a2b3 !important;
}


/* ==========================================================================
2. Navigation & Menu Alignment
   ========================================================================== */
.primary-menu { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  list-style: none !important; 
  margin: 0; 
  padding: 0; 
}

.primary-menu > li { 
  position: relative; 
  margin: 0 15px; 
}

.primary-menu li a { 
  display: inline-flex !important; 
  align-items: center !important; 
  text-transform: uppercase; 
  letter-spacing: 1px; 
  font-size: 14px; 
  color: var(--primary-color); 
  text-decoration: none !important; 
  padding: 20px 0 !important; 
  transition: color 0.3s ease;
}

.primary-menu li .toggle { 
  display: inline-flex !important; 
  position: relative !important; 
  margin-left: 8px !important; 
  width: auto !important; 
  height: auto !important; 
  border: none !important; 
  padding: 0 !important; 
  vertical-align: middle !important; 
}

/* Dropdown Styling */
.primary-menu ul { 
  position: absolute; 
  top: 100%; 
  left: 0; 
  margin: 0; 
  padding: 10px 0; 
  background: #ffffff; 
  min-width: 180px; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
  visibility: hidden; 
  opacity: 0; 
  transition: all 0.3s ease; 
  z-index: 999; 
  list-style: none !important; 
}

.primary-menu li:hover > ul { 
  visibility: visible; 
  opacity: 1; 
}

.primary-menu ul li { 
  list-style: none !important; 
  margin: 0 !important; 
}

.primary-menu ul li a { 
  padding: 10px 20px !important; 
  display: block; 
  text-align: left; 
}


/* ==========================================================================
3. Tables, Buttons & Archive Headers
   ========================================================================== */
.emmaknitty-table-container { 
  max-width: 100%; 
  margin: 40px 0; 
  overflow-x: auto; 
  border: 1px solid #ebdcd9; 
  border-radius: 3px; 
  background: #fff; 
}

.emmaknitty-table { 
  width: 100%; 
  border-collapse: collapse; 
}

.emmaknitty-table th { 
  background: #f5eae6; 
  color: var(--primary-color); 
  padding: 16px 20px; 
  text-transform: uppercase; 
  border-bottom: 1px solid #ebdcd9; 
}

.emmaknitty-table td { 
  padding: 15px 20px; 
  border-bottom: 1px solid #f7eeec; 
}

button, 
input[type="button"], 
.button, 
.wp-block-button__link { 
  background: #fff; 
  color: var(--primary-color); 
  border: 1px solid var(--primary-color); 
  padding: 15px 30px; 
  text-transform: uppercase; 
  transition: all 0.3s ease; 
  display: inline-block; 
}

button:hover, 
input[type="button"]:hover,
.button:hover,
.wp-block-button__link:hover { 
  background-color: var(--primary-color); 
  color: #fff !important; 
}

.archive-box, 
.page-header { 
  background: #ffffff !important; 
  border: none !important; 
  box-shadow: none !important; 
}

.archive-box h1, 
.archive-box .category-title { 
  color: #b99b49 !important; 
}


/* ==========================================================================
4. Refined Post Titles & Grid Post Cards
   ========================================================================== */
.entry-title,
.post-title,
h1.entry-title {
  font-weight: 400 !important;
  font-size: 1.55rem !important; 
  line-height: 1.4 !important;
  letter-spacing: 1px !important;
  color: #b99b49 !important;
  text-transform: uppercase;
  margin-bottom: 20px !important;
}

.entry-title a,
.post-title a {
  letter-spacing: 1px;
  line-height: 1.4;
}

.article, .post {
  margin-bottom: 45px;
}

/* Soften Post Grid Titles */
.related-posts .entry-title,
.related-posts .post-title,
.wp-block-latest-posts__post-title,
.post-grid .entry-title,
.grid-item .entry-title,
article .entry-title a {
  font-weight: 400 !important;
  color: #b8860b !important;
}


/* ==========================================================================
5. Airy Typography, Soft Gold Bolds, H2 Dotted Flourishes & Flow
   ========================================================================== */
.entry-content p,
.post-content p {
  color: #5a4a42;
  line-height: 1.9;
  margin-bottom: 2em;
}

.entry-content strong, 
.entry-content b,
.post-content strong,
.post-content b,
.entry-content ul li strong,
.post-content ul li strong {
  font-weight: 500 !important; 
  color: #b8860b !important;
}

/* Subheadings with Symmetrical Dotted Flourishes Before and After */
.entry-content h2, 
.post-content h2 {
  font-weight: 500 !important;
  color: #b8860b;
  letter-spacing: 1px;
  margin-top: 2.5em;
  margin-bottom: 1em;
  position: relative;
  padding-top: 25px;
  padding-bottom: 25px;
}

.entry-content h2::before, 
.post-content h2::before {
  content: "· · · · · · · · · ·";
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: #c8a2b3;
  opacity: 0.7;
  margin-bottom: 12px;
  letter-spacing: 6px;
}

.entry-content h2::after, 
.post-content h2::after {
  content: "· · · · · · · · · ·";
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: #c8a2b3;
  opacity: 0.7;
  margin-top: 12px;
  letter-spacing: 6px;
}

.entry-content h3,
.post-content h3 {
  font-weight: 500 !important;
  color: #b8860b;
  letter-spacing: 1px;
  margin-top: 2.5em;
  margin-bottom: 1em;
}

.entry-content ul,
.post-content ul {
  list-style: none;
  padding-left: 0;
}

.entry-content ul li,
.post-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 0.8em;
  font-weight: 400;
  color: #5a4a42;
}

.entry-content ul li::before,
.post-content ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #c8a2b3;
  font-weight: 400;
}

.entry-content ul li a,
.post-content ul li a {
  font-weight: 500 !important;
  color: #3b2e27 !important;
}

.entry-content > p:first-of-type::first-letter,
.post-content > p:first-of-type::first-letter {
  font-size: 3.2rem;
  line-height: 0.8;
  float: left;
  margin-right: 12px;
  margin-top: 4px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  color: #b8860b;
}

.entry-content blockquote,
.post-content blockquote {
  background-color: #fffaf8;
  border-left: 3px solid #c8a2b3;
  border-radius: 0 10px 10px 0;
  padding: 20px 25px;
  margin: 2.5em 0;
  color: #5a4a42;
  font-style: normal;
}

.entry-content blockquote p,
.post-content blockquote p {
  margin-bottom: 0 !important;
}

.entry-content img,
.post-content img {
  border-radius: 8px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.entry-content img:hover,
.post-content img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}


/* ==========================================================================
6. Featured Cards Section Divider
   ========================================================================== */
.home .featured-posts,
.home .wp-block-columns:first-of-type,
.site-header + .entry-content,
.site-header + .content-area {
  border-bottom: 1px solid #ebdcd9;
  padding-bottom: 35px;
  margin-bottom: 40px;
}


/* ==========================================================================
7. Table of Contents (TOC) Custom Styling
   ========================================================================== */
.toc-container {
  background-color: #fdfaf6;
  border: 2px solid #f0e6dd;
  border-radius: 12px;
  padding: 30px;
  margin: 35px 0;
  max-width: 450px;
}

.toc-title {
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 18px;
  color: #4a4a4a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc-list a {
  text-decoration: none;
  color: #c8a2b3;
  transition: all 0.3s ease;
  font-weight: 500;
}

.toc-list a:hover {
  color: #b8860b;
  text-decoration: underline;
}


/* ==========================================================================
8. Rank Math Bold Softening Overrides
   ========================================================================== */
[class*="rank-math"] a,
[class*="rank-math"] li,
[class*="rank-math"] strong,
[class*="rank-math"] span,
.rank-math-block a,
.rank-math-toc a {
  font-weight: 500 !important;
  color: #b8860b !important;
  text-decoration: none !important;
}

[class*="rank-math"] a:hover {
  color: #c8a2b3 !important;
}


/* ==========================================================================
9. Sidebar Styling Polish
   ========================================================================== */
.widget_search input[type="search"],
.widget_search input.search-field,
.search-form input[type="search"] {
  background-color: #fffaf8 !important;
  border: 1.5px solid #ebdcd5 !important;
  border-radius: 25px !important;
  padding: 10px 18px !important;
  color: #5a4a42 !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.95rem !important;
  box-shadow: none !important;
}

.widget_search input[type="search"]:focus,
.widget_search input.search-field:focus {
  border-color: #c8a2b3 !important;
  outline: none !important;
}

.widget_social_icons a,
.social-navigation a,
.widget_media_image a {
  transition: all 0.3s ease !important;
}

.widget_social_icons a:hover,
.social-navigation a:hover {
  transform: translateY(-2px);
  color: #c8a2b3 !important;
  border-color: #c8a2b3 !important;
}

.widget-title, 
.sidebar .widgettitle {
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  letter-spacing: 1.5px !important;
  color: #b8860b !important;
  text-transform: uppercase;
  margin-bottom: 18px !important;
  border-bottom: 1px solid #f2e6e1;
  padding-bottom: 8px;
}

.sidebar .widget, 
aside .widget, 
.site-sidebar .wp-block-group,
aside .wp-block-group {
  margin-bottom: 3rem !important;
}


/* ==========================================================================
10. Permanent Removal of Related Posts & Author Bios
   ========================================================================== */
.single-related-posts, 
.related-posts, 
.entry-related,
.yarpp-related,
.author-bio, 
.rebeccalite-post-author,
.post-author,
.author-info,
.entry-author,
.entry-footer .author-bio,
.share-links,
.social-share,
.entry-share { 
  display: none !important; 
}

h2:has(+ [class*="related"]),
.related-title,
.entry-related-title {
  display: none !important;
}


/* ==========================================================================
11. Pagination & Layout Cleanup
   ========================================================================== */
.navigation.pagination .page-numbers {
  background: transparent !important;
  font-size: 18px !important;
  color: #000000 !important;
  width: auto !important;
  padding: 0 10px !important;
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
  background: transparent !important;
  color: #c8a2b3 !important;
  font-weight: bold;
}

.site-footer {
  padding-top: 50px;
  padding-bottom: 50px;
}

.entry-footer .tags-links, 
.entry-footer .post-tags, 
.entry-footer .tags, 
.tag-links,
.tag-cloud,
.entry-tags { 
  display: none !important; 
}


/* ==========================================================================
12. Form Controls & Inputs Polish
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  background-color: #fffaf8 !important;
  border: 1.5px solid #ebdcd5 !important;
  border-radius: 4px !important;
  padding: 12px 16px !important;
  color: #5a4a42 !important;
  font-family: 'Jost', sans-serif !important;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus {
  border-color: #c8a2b3 !important;
  outline: none !important;
}


/* ==========================================================================
13. Blog Header & Site Title Hover Color
   ========================================================================== */
.site-title a:hover,
.site-branding a:hover,
.blog-header a:hover,
.archive-box h1:hover,
.page-header h1:hover {
  color: #c8a2b3 !important;
  transition: color 0.3s ease;
}

/* ==========================================================================
14. Card Categories & Title Spacing Polish
   ========================================================================== */
.cat-links,
.post-categories,
.entry-categories,
.entry-meta .cat-links {
  font-size: 0.72rem !important;
  line-height: 1.65 !important;
  letter-spacing: 0.8px !important;
  color: #7d6b62 !important;
  display: block;
  margin-bottom: 10px;
}

.cat-links a,
.post-categories a,
.entry-categories a {
  color: #7d6b62 !important;
  font-weight: 400 !important;
}

.cat-links a:hover,
.post-categories a:hover,
.entry-categories a:hover {
  color: #c8a2b3 !important;
}

/* Balanced line rhythm when a grid card title wraps onto two or three lines */
.post-grid .entry-title,
.grid-item .entry-title,
.related-posts .entry-title,
.wp-block-latest-posts__post-title {
  line-height: 1.45 !important;
  letter-spacing: 0.9px !important;
  margin-top: 8px !important;
  margin-bottom: 14px !important;
}

/* ==========================================================================
14. Card Categories, Title Rhythm & Excerpt Spacing
   ========================================================================== */
.cat-links,
.post-categories,
.entry-categories,
.entry-meta .cat-links {
  font-size: 0.72rem !important;
  line-height: 1.65 !important;
  letter-spacing: 0.8px !important;
  color: #7d6b62 !important;
  display: block;
  margin-bottom: 22px !important;
}

.cat-links a,
.post-categories a,
.entry-categories a {
  color: #7d6b62 !important;
  font-weight: 400 !important;
}

.cat-links a:hover,
.post-categories a:hover,
.entry-categories a:hover {
  color: #c8a2b3 !important;
}

/* Extra space between categories and title, plus clean title-to-excerpt spacing */
.post-grid .entry-title,
.grid-item .entry-title,
.related-posts .entry-title,
.wp-block-latest-posts__post-title,
article .entry-title {
  line-height: 1.45 !important;
  letter-spacing: 0.9px !important;
  margin-top: 18px !important;
  margin-bottom: 22px !important;
}

/* Extra breathing room above the excerpt */
.post-grid .entry-summary,
.post-grid .post-excerpt,
.grid-item .entry-summary,
.grid-item .post-excerpt,
.wp-block-latest-posts__post-excerpt,
article .entry-summary,
article .post-excerpt {
  margin-top: 14px !important;
}

/* ==========================================================================
14. Card Image Gap, Hidden Categories, Centred Title & Excerpt Spacing
   ========================================================================== */
.cat-links,
.post-categories,
.entry-categories,
.entry-meta .cat-links,
.post-meta .cat-links {
  display: none !important;
}

/* Subtle gap below card images */
.post-grid .post-thumbnail,
.post-grid .entry-media,
.grid-item .post-thumbnail,
.grid-item .entry-media,
.wp-block-latest-posts__featured-image,
article .post-thumbnail,
article .entry-media {
  margin-bottom: 18px !important;
}

/* Keep the date on the far left */
.posted-on,
.entry-date,
.post-date,
.entry-meta .posted-on {
  text-align: left !important;
  flex-shrink: 0;
}

/* Centred post title with balanced spacing above and below */
.post-grid .entry-title,
.grid-item .entry-title,
.related-posts .entry-title,
.wp-block-latest-posts__post-title,
article .entry-title {
  text-align: center !important;
  line-height: 1.45 !important;
  letter-spacing: 0.9px !important;
  margin-top: 12px !important;
  margin-bottom: 18px !important;
  margin-left: auto;
  margin-right: auto;
}

/* Gentle gap between the title and excerpt, keeping excerpts visible */
.post-grid .entry-summary,
.post-grid .post-excerpt,
.grid-item .entry-summary,
.grid-item .post-excerpt,
.wp-block-latest-posts__post-excerpt,
article .entry-summary,
article .post-excerpt {
  display: block !important;
  margin-top: 12px !important;
}