/* Brand palette: green-led identity; component colors should consume these tokens. */
:root {
  --primary: #165248;
  --primary_hover: #0f4038;
  --secondary: #165248;
  --text: #56635f;
  --accent: #0d2f29;

  --ttd-primary: var(--primary);
  --ttd-primary-hover: var(--primary_hover);
  --ttd-secondary: var(--secondary);
  --ttd-text: var(--text);
  --ttd-accent: var(--accent);
  --ttd-white: #ffffff;
  --ttd-surface-soft: #f1f6f4;
  --ttd-border: rgba(22, 82, 72, 0.14);
  --ttd-shell: 1300px;
  --ttd-gutter: 24px;
  --ttd-section-space: 96px;
  --ttd-section-space-mobile: 68px;
  --ttd-font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ttd-font-secondary: var(--ttd-font-primary);
  --ttd-font-page-title: clamp(42px, 4.5vw, 60px);
  --ttd-font-section-title: clamp(34px, 3.6vw, 50px);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ttd-text);
  font-family: var(--ttd-font-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
.bricks-button {
  font-family: var(--ttd-font-primary);
}

a {
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease;
}

.ttd-shell {
  width: min(100% - (var(--ttd-gutter) * 2), var(--ttd-shell));
  max-width: var(--ttd-shell);
  margin-inline: auto;
}

.ttd-section-title {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  align-self: stretch;
  color: var(--ttd-secondary);
  font-size: var(--ttd-font-section-title);
  font-weight: 400;
  line-height: 1.15;
  text-align: center !important;
}

.ttd-section-lead {
  width: 100%;
  max-width: 680px;
  margin: 24px auto 0;
  align-self: center;
  color: var(--ttd-text);
  font-size: 15px;
  line-height: 1.9;
  text-align: center;
}

.ttd-eyebrow {
  margin: 0 0 16px;
  color: var(--ttd-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Single post: improve long-form readability without affecting archive/sidebar media. */
body.single-post .brxe-post-content {
  color: var(--ttd-accent);
}

body.single-post .brxe-post-content h1,
body.single-post .brxe-post-content h2,
body.single-post .brxe-post-content h3,
body.single-post .brxe-post-content h4,
body.single-post .brxe-post-content h5,
body.single-post .brxe-post-content h6 {
  color: var(--ttd-secondary);
}

body.single-post .brxe-post-content img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin-left: 0;
  margin-right: 0;
}

/* Single post footer: replace the legacy author/share/related/navigation stack. */
body.single-post .brxe-post-author,
body.single-post .bricks-post-meta-wrapper,
body.single-post .brxe-post-sharing,
body.single-post .brxe-related-posts,
body.single-post .brxe-post-navigation,
body.single-post .dawp-social-share-container,
body.single-post article.brxe-container > h2:has(+ .brxe-related-posts) {
  display: none !important;
}

body.single-post .ttd-single-related {
  margin-top: 72px;
  padding-top: 42px;
  border-top: 1px solid var(--ttd-border);
  margin-bottom: 48px;
}

body.single-post .ttd-single-related__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

body.single-post .ttd-single-related__eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--ttd-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.single-post .ttd-single-related__heading h2 {
  margin: 0;
  color: var(--ttd-secondary);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.15;
}

body.single-post .ttd-single-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

body.single-post .ttd-single-related__card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--ttd-white);
  border: 1px solid var(--ttd-border);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

body.single-post .ttd-single-related__card:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 82, 72, 0.28);
  box-shadow: 0 18px 42px rgba(24, 99, 103, 0.1);
}

body.single-post .ttd-single-related__media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 200 / 113;
  overflow: hidden;
  background: var(--ttd-surface-soft);
}

body.single-post .brxe-post-content .ttd-single-related__media img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s ease;
}

body.single-post
  .ttd-single-related__card:hover
  .ttd-single-related__media
  img {
  transform: scale(1.035);
}

body.single-post .ttd-single-related__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  color: var(--ttd-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

body.single-post .ttd-single-related__body {
  padding: 22px 22px 24px;
}

body.single-post .ttd-single-related__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  color: var(--ttd-text);
  font-size: 12px;
  line-height: 1.5;
}

body.single-post .ttd-single-related__meta span {
  color: var(--ttd-primary);
  font-weight: 600;
  text-transform: uppercase;
}

body.single-post .ttd-single-related__body h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

body.single-post .ttd-single-related__body h3 a {
  color: var(--ttd-accent);
}

body.single-post .ttd-single-related__body h3 a:hover,
body.single-post .ttd-single-related__more:hover {
  color: var(--ttd-primary);
}

body.single-post .ttd-single-related__more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: var(--ttd-secondary);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 991px) {
  body.single-post .ttd-single-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body.single-post .ttd-single-related {
    margin-top: 52px;
    padding-top: 32px;
  }

  body.single-post .ttd-single-related__heading {
    display: block;
    margin-bottom: 22px;
  }

  body.single-post .ttd-single-related__grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  body.single-post .ttd-single-related__body {
    padding: 18px 18px 20px;
  }
}

@media (max-width: 767px) {
  :root {
    --ttd-gutter: 18px;
  }
/* Brand the DuyAnhWebPro product-review UI with the site's green palette. */
.dawp-reviews-wrapper .dawp-rating-avg,
.dawp-reviews-wrapper .dawp-rating-avg-star,
.dawp-reviews-wrapper .dawp-star-select:hover,
.dawp-reviews-wrapper .dawp-star-select:hover ~ .dawp-star-select,
.dawp-reviews-wrapper .dawp-star-select.selected,
.dawp-reviews-wrapper .dawp-star-select.selected ~ .dawp-star-select,
.dawp-reviews-wrapper .dawp-review-stars .dawp-star.full,
.dawp-reviews-wrapper .dawp-review-stars .dawp-star.half,
.dawp-reviews-wrapper .dawp-bar-count {
  color: var(--ttd-primary) !important;
}

.dawp-reviews-wrapper .dawp-bar-fill,
.dawp-reviews-wrapper .dawp-btn-toggle-form,
.dawp-reviews-wrapper .dawp-filter-btn.active,
.dawp-reviews-wrapper .dawp-page-btn.active {
  background: var(--ttd-primary) !important;
}

.dawp-reviews-wrapper .dawp-btn-toggle-form:hover {
  background: var(--ttd-primary-hover) !important;
}

.dawp-reviews-wrapper .dawp-filter-btn.active,
.dawp-reviews-wrapper .dawp-page-btn.active,
.dawp-reviews-wrapper .dawp-form-control:focus,
.dawp-reviews-wrapper .dawp-image-upload-zone:hover,
.dawp-reviews-wrapper .dawp-image-upload-zone.dragover,
.dawp-reviews-wrapper .dawp-tag-select-item input[type="checkbox"]:checked + span {
  border-color: var(--ttd-primary) !important;
}

.dawp-reviews-wrapper .dawp-form-control:focus {
  box-shadow: 0 0 0 3px rgba(22, 82, 72, 0.12) !important;
}

.dawp-reviews-wrapper .dawp-tag-select-item input[type="checkbox"]:checked + span {
  background: rgba(22, 82, 72, 0.08) !important;
  color: var(--ttd-primary) !important;
}

.dawp-reviews-wrapper .dawp-btn-submit {
  background: var(--ttd-primary) !important;
}
}
