/*
Theme Name: Cong Dong Nha Hang
Theme URI: https://congdongnhahang.com/
Author: Cong Dong Nha Hang
Author URI: https://congdongnhahang.com/
Description: Magazine-style WordPress theme for a Vietnamese restaurant and F&B operations community.
Version: 1.1.1
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cdnh
Tags: blog, news, custom-logo, featured-images, two-columns, threaded-comments, translation-ready
*/

:root {
  --cdnh-green: #14634b;
  --cdnh-green-dark: #0e3f33;
  --cdnh-red: #b9342b;
  --cdnh-gold: #e4a93a;
  --cdnh-cream: #fff8ed;
  --cdnh-ink: #1d2b28;
  --cdnh-muted: #65746f;
  --cdnh-line: #e3e0d6;
  --cdnh-white: #ffffff;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  color: var(--cdnh-ink);
  background: #fbfaf5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

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

a {
  color: var(--cdnh-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--cdnh-red);
}

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--cdnh-ink);
  color: var(--cdnh-white);
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container,
.site-header__inner,
.site-footer__inner,
.content-wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.content-wrap {
  padding: 48px 0 72px;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 36px;
  align-items: start;
}

.narrow-content {
  max-width: 790px;
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 248, 237, 0.96);
  border-bottom: 1px solid rgba(20, 99, 75, 0.14);
  backdrop-filter: blur(14px);
}

.site-header__top {
  background: var(--cdnh-green-dark);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.site-header__top .container {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 0;
}

.site-header__top a {
  color: #fff1d5;
  text-decoration: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 82px;
}

.site-branding {
  flex: 0 0 auto;
}

.site-branding img {
  width: min(275px, 58vw);
  height: auto;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 18px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(20, 99, 75, 0.25);
  background: var(--cdnh-white);
  color: var(--cdnh-green-dark);
  border-radius: 8px;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  content: "";
}

.menu-toggle span::before {
  transform: translateY(-7px);
}

.menu-toggle span::after {
  transform: translateY(5px);
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  display: block;
  padding: 10px 10px;
  color: var(--cdnh-ink);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border-radius: 8px;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  background: rgba(20, 99, 75, 0.09);
  color: var(--cdnh-green-dark);
}

.header-cta,
.button,
.wp-block-button__link,
.comment-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--cdnh-red);
  color: var(--cdnh-white);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.header-cta:hover,
.button:hover,
.wp-block-button__link:hover,
.comment-form input[type="submit"]:hover {
  color: var(--cdnh-white);
  background: #9f2b24;
  transform: translateY(-1px);
}

.button--light {
  background: var(--cdnh-cream);
  color: var(--cdnh-green-dark);
}

.button--light:hover {
  background: #fff0cd;
  color: var(--cdnh-green-dark);
}

.hero {
  position: relative;
  min-height: 640px;
  color: var(--cdnh-white);
  overflow: hidden;
  background: var(--cdnh-green-dark);
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(9, 39, 32, 0.88) 0%, rgba(9, 39, 32, 0.66) 44%, rgba(9, 39, 32, 0.14) 100%);
  content: "";
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 118px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #ffe8a9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 30px;
  height: 2px;
  background: var(--cdnh-gold);
  content: "";
}

.hero h1,
.page-hero h1,
.archive-hero h1 {
  max-width: 790px;
  margin: 0;
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(720px, 100%);
  margin-top: 54px;
}

.hero__stat {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.hero__stat strong {
  display: block;
  color: #fff3c8;
  font-size: 30px;
  line-height: 1;
}

.hero__stat span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.section {
  padding: 70px 0;
}

.section--cream {
  background: var(--cdnh-cream);
}

.section--green {
  background: var(--cdnh-green-dark);
  color: var(--cdnh-white);
}

.section--tight {
  padding: 48px 0;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 28px;
}

.section__head h2 {
  max-width: 720px;
  margin: 0;
  font-size: 34px;
  line-height: 1.18;
}

.section__head p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--cdnh-muted);
}

.section--green .section__head p {
  color: rgba(255, 255, 255, 0.74);
}

.category-grid,
.post-grid,
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: stretch;
}

.featured-story {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-radius: 8px;
  background: var(--cdnh-green-dark);
  color: var(--cdnh-white);
}

.featured-story img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-story::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 35, 30, 0.92), rgba(8, 35, 30, 0.16));
  content: "";
}

.featured-story__body {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 34px;
}

.featured-story h2 {
  margin: 12px 0 10px;
  font-size: 34px;
  line-height: 1.16;
}

.featured-story a {
  color: inherit;
  text-decoration: none;
}

.featured-story .entry-meta,
.featured-story .entry-meta a {
  color: rgba(255, 255, 255, 0.78);
}

.featured-story p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.insight-panel {
  display: grid;
  gap: 14px;
}

.insight-item {
  padding: 20px;
  border: 1px solid var(--cdnh-line);
  border-radius: 8px;
  background: var(--cdnh-white);
}

.insight-item a {
  color: var(--cdnh-ink);
  text-decoration: none;
  font-weight: 900;
}

.insight-item a:hover {
  color: var(--cdnh-red);
}

.insight-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--cdnh-muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-strip,
.resource-grid,
.pricing-grid {
  display: grid;
  gap: 18px;
}

.metric-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-item,
.resource-card,
.pricing-card {
  padding: 24px;
  border: 1px solid rgba(20, 99, 75, 0.14);
  border-radius: 8px;
  background: var(--cdnh-white);
}

.metric-item strong {
  display: block;
  color: var(--cdnh-red);
  font-size: 28px;
  line-height: 1;
}

.metric-item span,
.resource-card p,
.pricing-card p {
  color: var(--cdnh-muted);
}

.resource-grid,
.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-card h3,
.pricing-card h3 {
  margin: 0 0 10px;
  color: var(--cdnh-green-dark);
  font-size: 21px;
  line-height: 1.25;
}

.pricing-card strong {
  display: block;
  margin-bottom: 12px;
  color: var(--cdnh-red);
  font-size: 22px;
}

.category-card,
.post-card,
.service-card {
  overflow: hidden;
  border: 1px solid var(--cdnh-line);
  border-radius: 8px;
  background: var(--cdnh-white);
  box-shadow: 0 16px 34px rgba(29, 43, 40, 0.07);
}

.category-card {
  position: relative;
  min-height: 310px;
  display: flex;
  align-items: flex-end;
  color: var(--cdnh-white);
  border: 0;
  background: var(--cdnh-green-dark);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 35, 30, 0.9), rgba(10, 35, 30, 0.18));
  content: "";
}

.category-card__body {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.category-card a {
  color: inherit;
  text-decoration: none;
}

.category-card h3,
.post-card h2,
.post-card h3,
.service-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.category-card p,
.post-card p,
.service-card p {
  margin: 12px 0 0;
}

.post-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8e3d7;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body,
.service-card {
  padding: 22px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card__number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(228, 169, 58, 0.18);
  color: var(--cdnh-red);
  font-weight: 900;
}

.entry-meta,
.post-card__meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--cdnh-muted);
  font-size: 13px;
  font-weight: 700;
}

.entry-meta a,
.post-card__meta a,
.breadcrumb a {
  color: var(--cdnh-muted);
  text-decoration: none;
}

.breadcrumb {
  margin-bottom: 20px;
}

.breadcrumb span {
  color: #9b8f7d;
}

.page-hero,
.archive-hero {
  position: relative;
  color: var(--cdnh-white);
  background: var(--cdnh-green-dark);
  overflow: hidden;
}

.page-hero__image,
.archive-hero__image {
  position: absolute;
  inset: 0;
}

.page-hero__image img,
.archive-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::after,
.archive-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 36, 30, 0.9), rgba(8, 36, 30, 0.52));
  content: "";
}

.page-hero__content,
.archive-hero__content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 86px 0;
}

.page-hero p,
.archive-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.entry-content {
  color: #273834;
}

.entry-content > * {
  max-width: 790px;
  margin-left: auto;
  margin-right: auto;
}

.entry-content > .alignwide,
.entry-content > figure.alignwide,
.entry-content > .wp-block-image.alignwide {
  max-width: 1040px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 34px;
  margin-bottom: 12px;
  color: var(--cdnh-green-dark);
  line-height: 1.2;
}

.entry-content h2 {
  font-size: 30px;
}

.entry-content h3 {
  font-size: 24px;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin-top: 0;
  margin-bottom: 18px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 24px;
}

.entry-content li + li {
  margin-top: 8px;
}

.entry-content figure {
  margin-top: 32px;
  margin-bottom: 32px;
}

.entry-content figure img {
  width: 100%;
  border-radius: 8px;
}

.entry-content figcaption {
  margin-top: 9px;
  color: var(--cdnh-muted);
  font-size: 13px;
  text-align: center;
}

.entry-content blockquote {
  padding: 26px 30px;
  border-left: 5px solid var(--cdnh-gold);
  border-radius: 8px;
  background: var(--cdnh-cream);
  color: var(--cdnh-green-dark);
  font-size: 20px;
  font-weight: 700;
}

.entry-footer {
  max-width: 790px;
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--cdnh-line);
  color: var(--cdnh-muted);
  font-size: 14px;
}

.related-posts {
  max-width: 1040px;
  margin: 56px auto 0;
  padding-top: 36px;
  border-top: 1px solid var(--cdnh-line);
}

.related-posts h2 {
  margin: 0 0 20px;
  font-size: 26px;
}

.sidebar {
  display: grid;
  gap: 22px;
}

.widget {
  padding: 24px;
  border: 1px solid var(--cdnh-line);
  border-radius: 8px;
  background: var(--cdnh-white);
}

.widget-title,
.widget h2,
.widget h3 {
  margin: 0 0 14px;
  color: var(--cdnh-green-dark);
  font-size: 18px;
  line-height: 1.3;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li + li {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(227, 224, 214, 0.8);
}

.widget a {
  font-weight: 700;
  text-decoration: none;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.contact-form-field {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7d2c5;
  border-radius: 8px;
  background: var(--cdnh-white);
  color: var(--cdnh-ink);
  font: inherit;
}

.search-submit {
  min-width: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--cdnh-green);
  color: var(--cdnh-white);
  font-weight: 900;
  cursor: pointer;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  min-width: 38px;
  padding: 8px 12px;
  border: 1px solid var(--cdnh-line);
  border-radius: 8px;
  background: var(--cdnh-white);
  color: var(--cdnh-green-dark);
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--cdnh-green);
  color: var(--cdnh-white);
}

.site-footer {
  margin-top: auto;
  background: var(--cdnh-green-dark);
  color: rgba(255, 255, 255, 0.84);
}

.site-footer__inner {
  padding: 54px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo img {
  width: min(280px, 76vw);
}

.footer-widget h2,
.footer-widget h3 {
  margin: 0 0 14px;
  color: var(--cdnh-white);
  font-size: 18px;
}

.footer-widget p,
.footer-widget li {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.footer-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-widget li + li {
  margin-top: 10px;
}

.footer-widget a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.footer-widget a:hover {
  color: #ffe3a1;
}

.site-info {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.site-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.not-found,
.content-none {
  padding: 48px;
  border: 1px solid var(--cdnh-line);
  border-radius: 8px;
  background: var(--cdnh-white);
}

@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .post-grid,
  .service-grid,
  .resource-grid,
  .pricing-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-layout {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1,
  .page-hero h1,
  .archive-hero h1 {
    font-size: 44px;
  }
}

@media (max-width: 820px) {
  .site-header__top {
    display: none;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .main-navigation {
    margin-left: auto;
  }

  .primary-menu {
    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid rgba(20, 99, 75, 0.16);
    border-radius: 8px;
    background: var(--cdnh-white);
    box-shadow: 0 18px 38px rgba(29, 43, 40, 0.16);
  }

  .main-navigation.toggled .primary-menu {
    display: flex;
  }

  .primary-menu a {
    padding: 12px;
  }

  .header-cta {
    display: none;
  }

  .hero {
    min-height: 590px;
  }

  .hero__content {
    padding: 92px 0 70px;
  }

  .hero__stats {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .section__head {
    display: block;
  }
}

@media (max-width: 640px) {
  .container,
  .site-header__inner,
  .site-footer__inner,
  .content-wrap,
  .hero__content,
  .page-hero__content,
  .archive-hero__content {
    width: min(100% - 28px, 1180px);
  }

  .hero h1,
  .page-hero h1,
  .archive-hero h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p,
  .archive-hero p {
    font-size: 16px;
  }

  .category-grid,
  .post-grid,
  .service-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .resource-grid,
  .pricing-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .featured-story {
    min-height: 430px;
  }

  .featured-story__body {
    padding: 24px;
  }

  .featured-story h2 {
    font-size: 28px;
  }

  .section {
    padding: 52px 0;
  }

  .content-wrap {
    padding: 34px 0 52px;
  }

  .entry-content h2 {
    font-size: 26px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-submit {
    min-height: 44px;
  }
}
