/* === SSA Gutenberg Brand Styles === */
/* Loaded on frontend + editor (via add_editor_style) */
/* Note: :where() gives zero specificity — use direct selectors where Tailwind resets win */

/* === Headings — direct selector to override Tailwind typography plugin === */
.wp-block-heading {
  font-family: 'Playfair Display', serif !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  /* NO color here — Tailwind text-* utilities must win (skill rule 4) */
}

/* Size scale only applies when no Tailwind text-* class present */
h1:not([class*="text-"]) { font-size: 2.5rem; line-height: 1.15; }
h2:not([class*="text-"]) { font-size: 2rem; line-height: 1.2; }
h3:not([class*="text-"]) { font-size: 1.5rem; line-height: 1.25; }
h4:not([class*="text-"]) { font-size: 1.25rem; line-height: 1.3; }
h5:not([class*="text-"]) { font-size: 1.125rem; line-height: 1.35; }
h6:not([class*="text-"]) { font-size: 1rem; line-height: 1.4; }

/* === Paragraph / Body === */
/* Guarded — Tailwind font-*/text-*/leading-* utilities must win (design fidelity vs static) */
.wp-block-paragraph:not([class*="font-"]) { font-family: 'Lora', serif; }
.wp-block-paragraph:not([class*="text-"]) { font-size: 1rem; }
.wp-block-paragraph:not([class*="leading-"]) { line-height: 1.7; }
/* NO color here — Tailwind text-* utilities must win (skill rule 4) */

/* === Links — direct selector to beat Tailwind reset (exempt Tailwind-colored) === */
.wp-block-paragraph a:not([class*="text-"]),
.wp-block-list a:not([class*="text-"]),
.entry-content a:not([class*="text-"]) {
  color: #C79A2E !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.wp-block-paragraph a:not([class*="text-"]):hover,
.wp-block-list a:not([class*="text-"]):hover,
.entry-content a:not([class*="text-"]):hover {
  color: #8E6E1F !important;
}

/* === Blockquote === */
.wp-block-quote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #C79A2E;
  background: #FAF7F0;
  border-radius: 0.25rem;
}
.wp-block-quote p {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #3A3A3A;
}
.wp-block-quote cite {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-style: normal;
  font-size: 0.875rem;
  color: #6E7C8A;
  margin-top: 0.75rem;
}

/* === List — restore bullets with gold color === */
.wp-block-list {
  font-family: 'Lora', serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #3A3A3A;
  padding-left: 1.25rem;
  margin: 0.75rem 0;
  list-style-type: disc !important;
  list-style-position: outside !important;
}
.wp-block-list li::marker {
  color: #C79A2E;
}
.wp-block-list li {
  margin-bottom: 0.375rem;
}

/* === Image === */
:where(.wp-block-image) {
  margin: 1.5rem 0;
}
:where(.wp-block-image img) {
  height: auto;
  border-radius: 0.25rem;
}
:where(.wp-block-image figcaption) {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  color: #6E7C8A;
  text-align: center;
  margin-top: 0.5rem;
}

/* === Button === */
:where(.wp-block-button__link) {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 2rem;
  background-color: #C79A2E;
  color: #0B0B0A;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  display: inline-block;
  text-decoration: none;
}
:where(.wp-block-button__link:hover) {
  background-color: #8E6E1F;
  color: #0B0B0A;
}
:where(.wp-block-button__link:active) {
  transform: scale(0.98);
}
:where(.wp-block-button.is-style-outline .wp-block-button__link) {
  background-color: transparent;
  color: #C79A2E;
  border: 2px solid #C79A2E;
}
:where(.wp-block-button.is-style-outline .wp-block-button__link:hover) {
  background-color: #C79A2E;
  color: #0B0B0A;
}

/* === Table === */
.wp-block-table {
  font-family: 'Lora', serif;
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.wp-block-table thead {
  background: #0B0B0A;
}
.wp-block-table th {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: #FFFFFF;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.wp-block-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(199, 154, 46, 0.18);
  color: #3A3A3A;
}
:where(.wp-block-table tbody tr:hover) {
  background: #FAF7F0;
}

/* === Separator — direct selector to beat Tailwind === */
hr.wp-block-separator,
.wp-block-separator {
  border: none !important;
  border-top: 2px solid #C79A2E !important;
  margin: 2rem 0;
  max-width: 4rem;
}
.wp-block-separator.is-style-wide {
  max-width: 100%;
  border-top-width: 1px !important;
  border-color: rgba(199, 154, 46, 0.18) !important;
}
.wp-block-separator.is-style-dots {
  border: none !important;
  text-align: center;
  color: #C79A2E;
  font-size: 1.5rem;
  letter-spacing: 1em;
  max-width: none;
}

/* === Columns === */
:where(.wp-block-columns) {
  margin-bottom: 0;
  gap: 2rem;
}
:where(.wp-block-column) {
  flex-basis: 0;
}

/* === Code === */
:where(.wp-block-code) {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  background: #F4F1E9;
  border: 1px solid rgba(199, 154, 46, 0.18);
  border-radius: 0.25rem;
  padding: 1.25rem;
  line-height: 1.6;
  color: #3A3A3A;
  overflow-x: auto;
}
code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875em;
  background: #F4F1E9;
  padding: 0.15em 0.4em;
  border-radius: 0.2em;
  color: #8E6E1F;
}

/* === Gallery === */
:where(.wp-block-gallery) {
  margin: 1.5rem 0;
}
:where(.wp-block-gallery figcaption) {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  color: #6E7C8A;
}

/* === Embed === */
:where(.wp-block-embed) {
  margin: 1.5rem 0;
}
:where(.wp-block-embed iframe) {
  border-radius: 0.25rem;
}

/* === Pullquote === */
:where(.wp-block-pullquote) {
  border-top: 4px solid #C79A2E;
  border-bottom: 4px solid #C79A2E;
  padding: 1.5rem 0;
  margin: 2rem 0;
}
:where(.wp-block-pullquote p) {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.5;
  color: #3A3A3A;
}
:where(.wp-block-pullquote cite) {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-style: normal;
  font-size: 0.875rem;
  color: #6E7C8A;
}

/* === Cover === */
:where(.wp-block-cover) {
  min-height: 300px;
}
:where(.wp-block-cover h1, .wp-block-cover h2, .wp-block-cover h3) {
  color: #FFFFFF;
}
:where(.wp-block-cover p) {
  color: rgba(255, 255, 255, 0.9);
}

/* === Group === */
:where(.wp-block-group) {
  margin-top: 0;
  margin-bottom: 0;
}

/* === Spacer === */
:where(.wp-block-spacer) {
  max-height: 120px;
}

/* === File === */
:where(.wp-block-file__button) {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  background-color: #C79A2E;
  color: #0B0B0A;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s;
}
:where(.wp-block-file__button:hover) {
  background-color: #8E6E1F;
}

/* === Search === */
:where(.wp-block-search__input) {
  font-family: 'Lora', serif;
  border: 1px solid #BFC3C7;
  border-radius: 999px 0 0 999px;
  padding: 0.625rem 1rem;
  color: #3A3A3A;
}
:where(.wp-block-search__input:focus) {
  border-color: #C79A2E;
  outline: none;
  box-shadow: 0 0 0 3px rgba(199, 154, 46, 0.15);
}
:where(.wp-block-search__button) {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  background-color: #C79A2E;
  color: #0B0B0A;
  border: none;
  border-radius: 0 999px 999px 0;
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
:where(.wp-block-search__button:hover) {
  background-color: #8E6E1F;
}

/* === Latest Posts === */
:where(.wp-block-latest-posts__post-title) {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  color: #111111;
}
:where(.wp-block-latest-posts__post-title a) {
  color: #111111;
  text-decoration: none;
}
:where(.wp-block-latest-posts__post-title a:hover) {
  color: #C79A2E;
}
:where(.wp-block-latest-posts__post-date) {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  color: #6E7C8A;
}


/* === SSA Layout Pass-Through (grid/flex in wp:group) === */
.wp-block-group.ssa-layout > .wp-block-group__inner-container {
    display: contents;
}

/* === Gutenberg is-layout-flow margin neutralization === */
:root :where(.is-layout-flow) > * {
    margin-block-start: 0;
}

/* === Inner container reset === */
.wp-block-group > .wp-block-group__inner-container {
    padding: 0;
    margin: 0;
    max-width: 100%;
}

/* === wp:image in ssa-layout — fill containers === */
.wp-block-image.size-full img { width: 100%; height: 100%; object-fit: cover; }
.wp-block-group.relative.float-slow .wp-block-image.size-full img { object-fit: contain; }
.wp-block-group.relative.p-6.aspect-\[4\/3\] .wp-block-image.size-full img { object-fit: contain; padding: 1rem; }

/* Hero showroom is in a max-w-xl group, image should be full width inside */
.wp-block-group.relative.max-w-xl.mx-auto .wp-block-image.size-full img { object-fit: contain; }

/* === SSA Divider (wp:separator + ssa-divider class) === */
.wp-block-separator.ssa-divider {
    border: none !important;
    height: 14px;
    margin: 2rem 0;
    position: relative;
    max-width: 240px;
    background: none;
}
.wp-block-separator.ssa-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: calc(50% - 14px);
    height: 1px;
    background: linear-gradient(to right, #C79A2E, transparent);
}
.wp-block-separator.ssa-divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: calc(50% - 14px);
    height: 1px;
    background: linear-gradient(to left, #C79A2E, transparent);
}
.wp-block-separator.ssa-divider .wp-block-separator::before { display: none; }
/* Star via background SVG data URI centered */
.wp-block-separator.ssa-divider {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7 0L9 5L14 7L9 9L7 14L5 9L0 7L5 5Z' fill='%23C79A2E'/%3E%3C/svg%3E") center / 14px 14px no-repeat !important;
}

/* === TKDN progress fill — base width from data-progress (JS enhances) === */
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8E6E1F, #C79A2E);
    width: 0;
    transition: width 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-fill[data-progress="48.19"] { width: 48.19%; }
.progress-fill[data-progress="50.83"] { width: 50.83%; }
.progress-fill[data-progress="93.82"] { width: 93.82%; }
