/*
Theme Name: Chic and Grace
Theme URI: https://darkslategrey-quail-290838.hostingersite.com/
Author: Chic and Grace
Author URI: https://darkslategrey-quail-290838.hostingersite.com/
Description: A clean, original theme for a fashion and style blog for women over 50, with budget-friendly finds. Pink accents, perfect grid alignment, and a mobile-first responsive layout. No plugins required.
Version: 2.4
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chic-grace
*/

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

:root {
  --pink: #c2185b;
  --pink-dark: #880e4f;
  --maroon: #6e1e2b;
  --gold: #c9a86a;
  --ink: #222222;
  --muted: #666666;
  --line: #eeeeee;
  --blush: #fdf0f4;
  --cream: #fdf8f5;
  --bg: #ffffff;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 {
  font-size: 2.1rem;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--pink);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--pink-dark);
  text-decoration: underline;
}

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

.container {
  width: min(1100px, 92%);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--pink);
  color: #ffffff;
  padding: 0.7em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover,
.btn:focus {
  background: var(--pink-dark);
  color: #ffffff;
  text-decoration: none;
}

.pin-btn {
  display: inline-block;
  background: var(--pink);
  color: #ffffff;
  padding: 0.55em 1.3em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.pin-btn:hover,
.pin-btn:focus {
  background: var(--pink-dark);
  color: #ffffff;
  text-decoration: none;
}

/* ---------- Share buttons ---------- */
.share-row {
  display: flex;
  gap: 0.6rem;
  margin: 1.2em 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid;
  border-radius: 4px;
  background: #ffffff;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

.share-btn:hover,
.share-btn:focus {
  text-decoration: none;
  opacity: 0.85;
}

.share-fb {
  color: #1877f2;
  border-color: #1877f2;
}

.share-pin {
  color: #e60023;
  border-color: #e60023;
}

.share-x {
  color: #000000;
  border-color: #000000;
}

.share-wa {
  border-color: #25d366;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: 0.2em 0.4em;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-img {
  height: 64px;
  width: auto;
  display: block;
}

.menu-close,
.drawer-search,
.menu-overlay {
  display: none;
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.site-branding {
  margin-right: auto;
}

.site-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.site-title:hover,
.site-title:focus {
  color: var(--pink);
  text-decoration: none;
}

.site-tagline {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav .menu a {
  color: var(--ink);
  font-weight: 600;
}

.site-nav .menu a:hover,
.site-nav .menu a:focus {
  color: var(--pink);
}

.site-search {
  display: flex;
}

.site-search form,
form.search-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
}

.site-search .search-label,
.search-form .search-label {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.search-form input[type="search"] {
  padding: 0.45em 0.7em;
  border: 1px solid #cccccc;
  border-radius: 6px;
  font-size: 0.95rem;
  flex: 1 1 auto;
  min-width: 0;
}

.site-search input[type="search"] {
  max-width: 160px;
}

.wpforms-container-full .wpforms-form .wpforms-submit,
.wpforms-container-full .wpforms-form button[type="submit"] {
  background: var(--pink) !important;
  border-color: var(--pink) !important;
  color: #ffffff !important;
  border-radius: 6px;
  padding: 0.7em 1.4em;
}

.wpforms-container-full .wpforms-form .wpforms-submit:hover,
.wpforms-container-full .wpforms-form button[type="submit"]:hover {
  background: var(--pink-dark) !important;
  border-color: var(--pink-dark) !important;
}

.wpforms-container-full .wpforms-form input[type="text"],
.wpforms-container-full .wpforms-form input[type="email"],
.wpforms-container-full .wpforms-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-search input[type="submit"],
.site-search button {
  background: var(--pink);
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  padding: 0.45em 0.9em;
  font-size: 0.95rem;
  cursor: pointer;
}

.site-search input[type="submit"]:hover,
.site-search button:hover {
  background: var(--pink-dark);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.hero-dark {
  background: var(--maroon);
  color: #ffffff;
}

.hero-dark .hero-title {
  color: #ffffff;
}

.hero-dark .hero-intro {
  color: rgba(255, 255, 255, 0.88);
}

.hero-img {
  border: 4px solid #111111;
  box-shadow: 10px 10px 0 var(--gold);
  transform: rotate(-2deg);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

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

.hero-eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.8em;
}

.hero-title {
  font-size: 2.8rem;
  margin-bottom: 0.4em;
}

.hero-actions .btn {
  margin: 0.25em;
}

.btn-light {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.btn-light:hover,
.btn-light:focus {
  background: #ffffff;
  color: var(--pink-dark);
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: #1a1a1a;
  border: 2px solid #000000;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000000;
  font-weight: 700;
}

.btn-gold:hover,
.btn-gold:focus {
  background: #d8bc82;
  color: #1a1a1a;
  text-decoration: none;
}

.section-title-center {
  text-align: center;
  border-bottom: 0;
}

.hero-intro {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Sections ---------- */
.section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.section-title {
  font-size: 1.7rem;
  padding-bottom: 0.35em;
  border-bottom: 3px solid var(--pink);
  margin-bottom: 1.2em;
}

.see-all {
  text-align: center;
  margin-top: 1.5em;
}

/* ---------- Cards and grids ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cat-card {
  background: transparent;
  box-shadow: none;
}

.cat-card .card-img-link {
  padding: 0;
}

.cat-card .card-img-wrap {
  border-radius: 0;
}

.cat-card .card-body {
  text-align: center;
  padding: 0;
}

.cat-card .card-title {
  font-size: 1.5rem;
}

.cat-card .card-title a {
  color: var(--ink);
}

.cat-card-btn {
  margin: -1.4em 0 0.8em;
  position: relative;
  z-index: 1;
}

.card-cat,
.post-cat {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.4em;
}

.card-cat a,
.post-cat a {
  color: var(--pink);
}

body.single .site-header {
  padding: 0.5rem 0;
}

body.single .site-logo-img {
  height: 44px;
}

body.single .site-tagline {
  display: none;
}

.card-img-link {
  display: block;
  padding: 14px 14px 0;
}

.card-img-wrap {
  display: block;
  overflow: hidden;
  background: var(--blush);
  border-radius: 6px;
}

.card-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.card-img-empty {
  background: var(--blush);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.1rem 1.2rem;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.4em;
}

.card-title a {
  color: var(--pink-dark);
}

.card-title a:hover,
.card-title a:focus {
  color: var(--pink);
}

.card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.card-date {
  color: var(--ink);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Pages and posts ---------- */
.page-title {
  font-size: 2.2rem;
  text-align: center;
  margin: 1.5rem 0 1rem;
}

.archive-desc {
  color: var(--muted);
  margin-bottom: 1.5em;
}

.single-post {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 0;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.2em;
}

.post-meta a {
  color: var(--muted);
}

.post-meta a:hover,
.post-meta a:focus {
  color: var(--pink);
}

.single-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1.5em;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 1.6em;
}

.tip-box {
  background: var(--blush);
  border-left: 4px solid var(--pink);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin: 1.5em 0;
}

.tip-box p:last-child {
  margin-bottom: 0;
}

/* Post tables (e.g. Quick-scan summary): articles publish bare <table>
   markup with no classes, so the theme must style it directly. */
.table-wrap {
  overflow-x: auto;
  margin: 1.5em 0;
  -webkit-overflow-scrolling: touch;
}

.post-content table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
}

.post-content th {
  background: var(--maroon);
  color: #fff;
  text-align: left;
  padding: 0.75rem 1rem;
}

.post-content th:first-child {
  border-top-left-radius: 9px;
}

.post-content th:last-child {
  border-top-right-radius: 9px;
}

.post-content td {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.post-content tbody tr:nth-child(even) td {
  background: var(--cream);
}

/* "Styling tip:" paragraphs publish as plain <p> elements; main.js tags
   them with .styling-tip so they render as callout boxes. */
.post-content p.styling-tip {
  background: var(--blush);
  border-left: 4px solid var(--pink);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.2rem;
  margin: 1.5em 0;
}

.post-content p.styling-tip strong {
  color: var(--pink-dark);
}

/* A tip paragraph that the server-side filter already wrapped in a
   .tip-box must not draw a second box inside it: the outer box alone
   provides the background and the left bar. Standalone .tip-box and
   standalone p.styling-tip keep their own styling. */
.tip-box p.styling-tip {
  background: transparent;
  border-left: none;
  padding: 0;
  margin: 0;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  margin: 2em 0;
}

.post-nav a {
  font-weight: 600;
}

.brand-box {
  background: var(--blush);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin: 2em 0;
}

.brand-box h2 {
  font-size: 1.4rem;
}

.brand-box p:last-of-type {
  margin-bottom: 1em;
}

.post-share {
  margin: 1.5em 0;
}

/* ---------- Pagination ---------- */
.pagination {
  text-align: center;
  margin: 2em 0;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.pagination .page-numbers {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35em 0.8em;
  color: var(--ink);
  text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
  border-color: var(--pink);
  color: var(--pink);
  text-decoration: none;
}

.pagination .page-numbers.current {
  background: var(--pink);
  border-color: var(--pink);
  color: #ffffff;
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  width: 100%;
  padding: 0.6em 0.8em;
  border: 1px solid #cccccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

input[type="submit"],
button[type="submit"] {
  background: var(--pink);
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  padding: 0.6em 1.5em;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--pink-dark);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  text-align: center;
}

.footer-nav .menu {
  list-style: none;
  margin: 0 0 0.8em;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
}

.footer-nav .menu a {
  color: var(--ink);
  font-weight: 600;
}

.footer-nav .menu a:hover,
.footer-nav .menu a:focus {
  color: var(--pink);
}

.footer-subscribe {
  color: var(--muted);
  margin: 0;
}

.footer-legal {
  text-align: center;
  margin: 0.8em 0 0;
  font-size: 0.9rem;
}

.footer-legal a {
  color: var(--muted);
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  h1,
  .hero-title {
    font-size: 1.9rem;
  }

  .site-header-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }

  .site-branding {
    margin-right: auto;
  }

  .site-tagline {
    display: none;
  }

  .site-header {
    padding: 0.5rem 0;
  }

  body.single .site-header {
    padding: 0.3rem 0;
  }

  .site-logo-img {
    height: 52px;
  }

  body.single .site-logo-img {
    height: 32px;
  }

  .single-post {
    padding: 0.75rem 0 2rem;
  }

  .hero {
    text-align: left;
  }

  .hero-img {
    margin: 0 0 1.5rem;
  }

  .hero-intro {
    margin-left: 0;
    margin-right: 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-search {
    display: none;
  }

  .site-nav {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(300px, 85vw);
    background: #ffffff;
    z-index: 100;
    transform: translateX(105%);
    transition: transform 0.3s ease;
    padding: 1rem 1.25rem;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
  }

  body.menu-open .site-nav {
    transform: translateX(0);
  }

  .menu-close {
    display: block;
    margin-left: auto;
    background: none;
    border: 0;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
  }

  .drawer-search {
    display: block;
    margin: 1rem 0;
  }

  .drawer-search input[type="search"] {
    max-width: none;
    width: 100%;
  }

  .site-nav .menu {
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
  }

  .site-nav .menu a {
    display: block;
    padding: 0.6em 0;
    font-size: 1.05rem;
  }

  .menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  body.menu-open .menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}
