/* ============================================
   Sữa Tuyệt Vời — Style Sheet (KV Guideline v1.0)
   Fonts: Fraunces (display) + Be Vietnam Pro (body)
   Palette: Rose / Sage / Honey / Plum / Cream
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');

:root {
  --cream: #FFF8F1; --cream-deep: #FCEFE3; --white: #FFFFFF;
  --rose: #F1A5B8; --rose-deep: #D97E96; --rose-pale: #FBE3E9;
  --sage: #8FB79A; --sage-deep: #6B9578; --sage-pale: #E6F0E7;
  --honey: #F0B84B; --honey-deep: #D99B2B; --honey-pale: #FDF0DC;
  --plum: #3E2F35; --plum-soft: #8A757D; --line: #EEDFCF;
  --radius: 16px; --radius-sm: 10px; --radius-pill: 99px;
  --max-w: 1140px;
  --font-display: 'Fraunces', serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--plum);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rose-deep); text-decoration: none; transition: color .2s; }
a:hover { color: var(--plum); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--plum); line-height: 1.15; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(16px, 4vw, 30px); }

/* ---- HEADER ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,248,241,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav-logo img { height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 14px; font-weight: 600; color: var(--plum-soft);
  padding: 8px 14px; border-radius: var(--radius-pill);
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--plum); background: var(--rose-pale); }
.nav-search {
  width: 36px; height: 36px; border: 1.5px solid var(--line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: transparent; color: var(--plum-soft); transition: all .2s;
}
.nav-search:hover { border-color: var(--rose); color: var(--rose-deep); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

/* ---- HERO SLIDER ---- */
.hero { display: grid; grid-template-columns: 1.8fr 1fr; gap: 4px; margin-bottom: 48px; border-radius: var(--radius); overflow: hidden; }
.hero-main { position: relative; min-height: 360px; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-main .overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(62,47,53,.85));
  padding: 30px 24px 20px; color: #fff;
}
.hero-main .overlay h2 { font-size: clamp(20px, 3vw, 28px); color: #fff; margin-bottom: 6px; }
.hero-main .overlay .cat-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--rose); margin-bottom: 8px; }
.hero-side { display: flex; flex-direction: column; gap: 4px; }
.hero-side a { flex: 1; position: relative; overflow: hidden; display: block; }
.hero-side a img { width: 100%; height: 100%; object-fit: cover; }
.hero-side .overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(62,47,53,.8)); padding: 14px; color: #fff; }
.hero-side .overlay h4 { font-size: 14px; color: #fff; }

/* ---- CATEGORY SECTION ---- */
.cat-section { padding: 48px 0; }
.cat-section:nth-child(even) { background: var(--cream-deep); }
.cat-section .sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.cat-section .sec-head h2 { font-size: clamp(22px, 3vw, 28px); }
.sec-head .more-link { font-size: 13px; font-weight: 600; color: var(--rose-deep); }
.sec-head .more-link:hover { color: var(--plum); }

/* Cards grid: 1 big + 4 small */
.cat-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.cat-grid .card:first-child { grid-row: span 2; }

/* ---- ARTICLE CARD ---- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(62,47,53,.08); }
.card .card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.cat-grid .card:first-child .card-img { aspect-ratio: auto; height: 100%; }
.card .card-body { padding: 14px 16px; }
.card .card-cat {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--rose-deep); margin-bottom: 6px;
}
.card .card-cat.sage { color: var(--sage-deep); }
.card .card-cat.honey { color: var(--honey-deep); }
.card .card-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; color: var(--plum); }
.card .card-title:hover { color: var(--rose-deep); }
.card .card-excerpt { font-size: 13.5px; color: var(--plum-soft); line-height: 1.55; }
.card .card-meta { font-size: 12px; color: var(--plum-soft); margin-top: 8px; }

/* ---- MAIN + SIDEBAR ---- */
.main-layout { display: grid; grid-template-columns: 2.1fr 1fr; gap: 36px; padding: 48px 0; }
.sidebar-widget { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.sidebar-widget .widget-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--rose-pale); }

/* Sidebar article items */
.sidebar-article { display: flex; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sidebar-article:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.sidebar-article img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.sidebar-article .title { font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--plum); }
.sidebar-article .title:hover { color: var(--rose-deep); }
.sidebar-article .date { font-size: 11.5px; color: var(--plum-soft); margin-top: 4px; }

/* Newsletter box */
.newsletter-box {
  background: var(--rose-pale);
  border: none;
  padding: 18px;
  padding-bottom: 12px;
  box-sizing: border-box;
}
.newsletter-box h3 { font-size: 15px; margin-bottom: 4px; text-align: center; }
.newsletter-box p { font-size: 12px; color: var(--plum-soft); margin-bottom: 12px; text-align: center; }
.newsletter-box .subscribe-form { display: flex; flex-direction: column; gap: 6px; }
.newsletter-box .subscribe-form .form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 13px;
  font-family: var(--font-body);
  box-sizing: border-box;
  margin: 0;
}
.newsletter-box .subscribe-form .form-input:focus { outline: none; border-color: var(--rose); }
.newsletter-box .subscribe-form textarea.form-input { resize: vertical; min-height: 44px; }
.newsletter-box .terms-check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: var(--plum-soft);
  line-height: 1.4;
  cursor: pointer;
  margin: 2px 0;
}
.newsletter-box .terms-check input[type="checkbox"] {
  width: 14px !important;
  height: 14px;
  margin: 1px 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--rose);
}
.newsletter-box .terms-check a { color: var(--rose-deep); text-decoration: underline; }
.newsletter-box .subscribe-form .btn { font-size: 13px; padding: 9px; width: 100%; box-sizing: border-box; margin: 0; }
.newsletter-box .form-msg { font-size: 11px; text-align: center; margin: 0; min-height: 0; }
.newsletter-box > a { display: block; margin-top: 6px; text-align: center; font-size: 11px; }

/* ---- LIST ITEMS ---- */
.list-article { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.list-article:last-child { border-bottom: none; }
.list-article img { width: 180px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.list-article .info { flex: 1; }
.list-article .cat-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rose-deep); margin-bottom: 4px; }
.list-article h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.list-article h3 a { color: var(--plum); }
.list-article h3 a:hover { color: var(--rose-deep); }
.list-article .excerpt { font-size: 13.5px; color: var(--plum-soft); }
.list-article .meta { font-size: 12px; color: var(--plum-soft); margin-top: 6px; }

/* ---- PAGINATION ---- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination a, .pagination span {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--plum-soft);
}
.pagination a:hover { border-color: var(--rose); color: var(--rose-deep); background: var(--rose-pale); }
.pagination .current { background: var(--plum); color: var(--cream); border-color: var(--plum); }

/* ---- CATEGORY PAGE ---- */
.page-hero { padding: 36px 0 28px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 13px; color: var(--plum-soft); margin-bottom: 10px; }
.breadcrumb a { color: var(--plum-soft); }
.breadcrumb a:hover { color: var(--rose-deep); }
.page-hero h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 8px; }
.page-hero p { color: var(--plum-soft); max-width: 60ch; }

.filter-pills { display: flex; gap: 8px; padding: 16px 0; flex-wrap: wrap; }
.filter-pills a {
  font-size: 13px; font-weight: 600; padding: 8px 18px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line); color: var(--plum-soft); background: var(--white);
  transition: all .2s;
}
.filter-pills a:hover, .filter-pills a.active { color: var(--plum); background: var(--rose-pale); border-color: var(--rose); }

.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 28px 0; }

/* ---- ARTICLE DETAIL ---- */
.article-wrap { display: grid; grid-template-columns: 2.1fr 1fr; gap: 36px; padding: 36px 0; }
.article-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; font-size: 13px; color: var(--plum-soft); }
.article-meta .cat-tag { background: var(--rose-pale); color: var(--rose-deep); padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; }
.article-content h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 20px; }
.article-content .hero-img { width: 100%; border-radius: var(--radius); margin-bottom: 28px; aspect-ratio: 16/9; object-fit: cover; }
.article-content .body-text { font-size: 16.5px; line-height: 1.75; }
.article-content .body-text h2 { font-size: 22px; margin: 32px 0 14px; }
.article-content .body-text h3 { font-size: 18px; margin: 24px 0 10px; }
.article-content .body-text p { margin-bottom: 16px; }
.article-content .body-text img { border-radius: var(--radius-sm); margin: 20px 0; }

/* Share */
.share-row { display: flex; gap: 10px; margin: 28px 0; }
.share-btn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--plum-soft); transition: all .2s; background: transparent; cursor: pointer; }
.share-btn:hover { border-color: var(--rose); color: var(--rose-deep); background: var(--rose-pale); }

/* Author */
.author-box { display: flex; gap: 16px; padding: 20px; background: var(--cream-deep); border-radius: var(--radius); margin: 28px 0; }
.author-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author-box .name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.author-box .bio { font-size: 13.5px; color: var(--plum-soft); }

/* Related */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }

/* TOC */
.toc-widget { position: sticky; top: 84px; }
.toc-widget .toc-item { display: block; font-size: 13.5px; color: var(--plum-soft); padding: 6px 0; border-left: 2px solid var(--line); padding-left: 14px; margin-bottom: 4px; transition: all .2s; }
.toc-widget .toc-item:hover, .toc-widget .toc-item.active { color: var(--rose-deep); border-left-color: var(--rose); }

/* ---- ABOUT PAGE ---- */
.about-section { padding: 56px 0; }
.about-section + .about-section { border-top: 1px solid var(--line); }
.about-section.alt { background: var(--cream-deep); }
.about-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.about-hero img { border-radius: var(--radius); }
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.about-split img { border-radius: var(--radius); }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.value-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 18px; text-align: center; }
.value-card .icon { font-size: 2rem; margin-bottom: 12px; }
.value-card h4 { font-size: 15px; margin-bottom: 6px; }
.value-card p { font-size: 13px; color: var(--plum-soft); }

/* Timeline */
.timeline { max-width: 600px; }
.timeline-item { display: grid; grid-template-columns: 60px 1fr; gap: 20px; margin-bottom: 28px; }
.timeline-dot {
  width: 48px; height: 48px; border-radius: 50%; background: var(--rose-pale);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--rose-deep);
}
.timeline-item h4 { font-size: 15px; margin-bottom: 4px; }
.timeline-item p { font-size: 13.5px; color: var(--plum-soft); }

/* ---- CONTACT ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: 48px 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font-body); background: var(--white); transition: border-color .2s;
}
.form-input:focus { outline: none; border-color: var(--rose); }
textarea.form-input { resize: vertical; min-height: 100px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 12px 24px; border-radius: var(--radius-pill); border: none; cursor: pointer; transition: all .25s; }
.btn-primary { background: var(--plum); color: var(--cream); }
.btn-primary:hover { background: #2a1f24; transform: translateY(-1px); }
.btn-rose { background: var(--rose); color: #fff; }
.btn-rose:hover { background: var(--rose-deep); }
.btn-outline { background: transparent; color: var(--plum); border: 1.5px solid var(--plum); }
.btn-outline:hover { background: var(--plum); color: var(--cream); }

/* Info card */
.contact-info .info-item { display: flex; gap: 14px; margin-bottom: 18px; }
.contact-info .info-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--rose-pale);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px;
}
.contact-info .info-text .label { font-size: 12px; color: var(--plum-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.contact-info .info-text .value { font-size: 14.5px; font-weight: 600; margin-top: 2px; }

/* ---- FOOTER ---- */
.site-footer { background: var(--plum); color: #C9B8BE; padding: 52px 0 0; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: var(--cream); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13.5px; color: #C9B8BE; margin-bottom: 8px; }
.footer-col a:hover { color: var(--rose); }
.footer-col .logo-footer img { height: 30px; margin-bottom: 12px; }
.footer-col .desc { font-size: 13px; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; display: flex; justify-content: space-between; font-size: 12.5px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; color: #C9B8BE; font-size: 14px;
  transition: all .2s;
}
.footer-social a:hover { background: var(--rose); border-color: var(--rose); color: #fff; }

/* Footer newsletter */
.footer-newsletter { display: flex; flex-direction: column; gap: 6px; }
.footer-newsletter input,
.footer-newsletter textarea { width: 100%; padding: 9px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-sm); background: rgba(255,255,255,.08); color: #fff; font-size: 13px; box-sizing: border-box; margin: 0; }
.footer-newsletter input::placeholder { color: rgba(255,255,255,.4); }
.footer-newsletter .terms-check { color: rgba(255,255,255,.6); font-size: 11px; display: flex; align-items: center; gap: 5px; margin: 2px 0; white-space: nowrap; }
.footer-newsletter label { align-self: flex-start; white-space: nowrap; flex-shrink: 0; }
.footer-newsletter .terms-check input[type="checkbox"] { width: 14px !important; height: 14px; margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--rose); }
.footer-newsletter .terms-check span { white-space: nowrap; }
.footer-newsletter .terms-check a { color: var(--rose); }
.footer-newsletter .btn { margin: 0; }
.footer-newsletter .form-msg { font-size: 11px; min-height: 0; margin: 0; }

/* ---- ALERT ---- */
.alert { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: var(--sage-pale); color: var(--sage-deep); }
.alert-error { background: var(--rose-pale); color: var(--rose-deep); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid .card:first-child { grid-row: span 1; grid-column: span 2; }
  .main-layout, .article-wrap { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .about-hero, .about-split, .contact-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .list-article { flex-direction: column; }
  .list-article img { width: 100%; height: 180px; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-grid .card:first-child { grid-column: span 1; }
  .articles-grid, .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
}

/* ===== Subscribe Form (generic / contact page) ===== */
.subscribe-form { max-width: 100%; }
.subscribe-form .form-input:focus { outline: none; border-color: var(--rose); }
.subscribe-form textarea.form-input { resize: vertical; }

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--plum-soft);
  margin-bottom: 10px;
  cursor: pointer;
  line-height: 1.4;
}
.terms-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--rose);
  flex-shrink: 0;
}
.terms-check a {
  color: var(--rose-deep);
  text-decoration: underline;
}

.form-msg {
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
  min-height: 16px;
}
.form-msg.success { color: var(--sage-deep); }
.form-msg.error { color: var(--rose-deep); }

/* ===== Alerts ===== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert-success { background: var(--sage-pale); color: var(--sage-deep); border: 1px solid var(--sage); }
.alert-error { background: var(--rose-pale); color: var(--rose-deep); border: 1px solid var(--rose); }
.alert-info { background: var(--honey-pale); color: var(--honey-deep); border: 1px solid var(--honey); }

/* ===== Terms page ===== */
.terms-content .body-text h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 1.15rem;
}
.terms-content .body-text ul {
  padding-left: 20px;
  margin-bottom: 16px;
}
.terms-content .body-text li {
  margin-bottom: 8px;
  font-size: 14.5px;
  line-height: 1.7;
}
