/*
Theme Name: Viet Thai Coffee & Restaurant
Theme URI: https://vietthai.example
Author: MCA
Author URI: https://vietthai.example
Description: Theme nhà hàng Viet Thai — convert từ HTML/Tailwind tĩnh. Ưu tiên hệ thống blog (Chia sẻ / Tin tức) viết bài trực tiếp trong wp-admin. Header, menu overlay và footer dùng chung mọi trang.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: viet-thai
Tags: restaurant, blog, custom-menu, featured-images, translation-ready
*/

/*
  Toàn bộ CSS giao diện nằm ở css/tailwind.css (đã build sẵn) và được nạp qua functions.php.
  File style.css này chỉ giữ header bắt buộc của WordPress + vài tinh chỉnh nhỏ cho phần blog do WP sinh ra.
*/

/* WYSIWYG editor (the_content) — căn ảnh, caption do WP chèn */
.entry-content img { max-width: 100%; height: auto; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .alignright { float: right; margin: 0 0 1rem 1.5rem; }
.entry-content .alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption-text { text-align: center; font-style: italic; font-size: 14px; color: #7A7A7A; margin-top: .5rem; }

/* Phân trang WordPress (the_posts_pagination) khớp tông màu wine/gold */
.vt-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.vt-pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid rgba(100,14,21,.4); border-radius: 8px; color: #640E15;
  font-family: "Destiny Gorgeous","Playfair Display",Georgia,serif; font-size: 18px; text-decoration: none;
}
.vt-pagination .page-numbers.current,
.vt-pagination .page-numbers:hover { background: #640E15; color: #FCF2DA; }

/* ============ NỘI DUNG BÀI (the_content) — viết bằng Advanced Editor Tools ============
   Style đầy đủ cho h2/h3/h4, đoạn văn, danh sách, trích dẫn, bảng, link, ảnh, code...
   theo đúng tông màu Viet Thai (wine #640E15, gold, ink). */
.vt-prose { color: #7A7A7A; font-family: "Google Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.7; }
.vt-prose > * + * { margin-top: 1.1rem; }

.vt-prose h2, .vt-prose h3, .vt-prose h4, .vt-prose h5, .vt-prose h6 {
  font-family: "Google Sans", system-ui, sans-serif; color: #505050; font-weight: 600; line-height: 1.3;
}
.vt-prose h2 { font-size: 26px; margin-top: 2.2rem; color: #14313A; }
.vt-prose h3 { font-size: 20px; margin-top: 2rem; }
.vt-prose h4 { font-size: 18px; margin-top: 1.6rem; }

.vt-prose p { margin-top: 0.9rem; }
.vt-prose a { color: #640E15; text-decoration: underline; text-decoration-color: rgba(221,176,70,.6); text-underline-offset: 3px; }
.vt-prose a:hover { color: #9E6310; }
.vt-prose strong { color: #505050; font-weight: 600; }

.vt-prose ul, .vt-prose ol { margin-top: 1rem; padding-left: 1.5rem; }
.vt-prose ul { list-style: disc; }
.vt-prose ol { list-style: decimal; }
.vt-prose li { margin-top: .4rem; }
.vt-prose li::marker { color: #DDB046; }

.vt-prose blockquote {
  margin: 1.6rem 0; padding: .8rem 1.4rem; border-left: 4px solid #DDB046;
  background: #FFF9EE; color: #640E15; font-style: italic; font-size: 18px;
}

.vt-prose img { border-radius: 6px; margin: 1.6rem auto; }
.vt-prose figure { margin: 1.6rem 0; }
.vt-prose figcaption { text-align: center; font-style: italic; font-size: 14px; color: #7A7A7A; margin-top: .5rem; }

.vt-prose hr { margin: 2rem 0; border: 0; border-top: 1px solid rgba(100,14,21,.15); }

.vt-prose table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: 15px; }
.vt-prose th, .vt-prose td { border: 1px solid rgba(100,14,21,.2); padding: .6rem .9rem; text-align: left; }
.vt-prose th { background: #640E15; color: #FCF2DA; font-family: "Destiny Gorgeous","Playfair Display",serif; font-weight: 400; }
.vt-prose tr:nth-child(even) td { background: #FFF9EE; }

.vt-prose code {
  background: #F1F1F1; color: #640E15; padding: .15em .4em; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em;
}
.vt-prose pre { background: #2b2b2b; color: #f8f8f2; padding: 1rem 1.2rem; border-radius: 8px; overflow-x: auto; margin: 1.6rem 0; }
.vt-prose pre code { background: transparent; color: inherit; padding: 0; }

/* ============ Hiệu ứng hover ảnh (trang Thực đơn, Gallery) ============
   Bọc ảnh trong .vt-img-hover (overflow-hidden). Khi hover:
   - ảnh phóng to mượt + sáng nhẹ
   - lớp phủ wine gradient từ đáy (tăng chiều sâu)
   - bóng nâng ảnh lên + viền gold mờ (sang trọng)
   - ánh sáng "shine" quét chéo qua ảnh 1 lần */
.vt-img-hover {
  overflow: hidden;
  position: relative;
  transition: box-shadow .45s ease, transform .45s cubic-bezier(.2,.6,.2,1);
}
.vt-img-hover img {
  transition: transform .6s cubic-bezier(.2,.6,.2,1), filter .5s ease;
  will-change: transform;
}
.vt-img-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -14px rgba(100,14,21,.45);
}
.vt-img-hover:hover img { transform: scale(1.08); filter: brightness(1.05) saturate(1.05); }

/* Lớp phủ wine gradient từ đáy */
.vt-img-hover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to top, rgba(100,14,21,.32), rgba(100,14,21,0) 55%);
  opacity: 0; transition: opacity .5s ease;
}
.vt-img-hover:hover::after { opacity: 1; }

/* Ánh sáng "shine" quét chéo qua ảnh khi hover */
.vt-img-hover::before {
  content: ""; position: absolute; top: 0; left: -75%; z-index: 2;
  width: 50%; height: 100%; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.35) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-18deg);
}
.vt-img-hover:hover::before { animation: vt-shine .85s ease forwards; }
@keyframes vt-shine {
  from { left: -75%; opacity: 0; }
  20%  { opacity: 1; }
  to   { left: 125%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .vt-img-hover, .vt-img-hover img { transition: none; }
  .vt-img-hover:hover { transform: none; box-shadow: none; }
  .vt-img-hover:hover img { transform: none; }
  .vt-img-hover:hover::before { animation: none; }
}

/* ============ Chữ "VIET THAI" lớn dưới footer (SVG) ============
   Thay cho ảnh footer-bg.webp — chữ SVG tự lấp đầy bề ngang footer.
   ĐỔI MÀU: chỉnh 2 biến --vt-footer-red-top (đỏ sáng, đỉnh chữ) và
   --vt-footer-red-bottom (đỏ tối, chân chữ). Số càng gần #000 càng đậm. */
.vt-footer-wordmark {
  /* Nền footer là wine #640E15. Chữ đỏ sáng hơn nền ở đỉnh, tối dần ở chân. */
  --vt-footer-red-top: #9E1B1B;
  --vt-footer-red-bottom: #7A1118;
}
/* Font block đậm như thiết kế gốc (sans-serif, in hoa). */
.vt-footer-wordmark-text {
  font-family: "Google Sans", "Arial Narrow", Arial, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* Comment list cơ bản (nếu bật bình luận) */
.vt-comments .comment-body { padding: 1rem 0; border-bottom: 1px solid rgba(100,14,21,.15); }
.vt-comments .comment-author .fn { font-weight: 600; color: #640E15; }

/* ============ SLIDER ĐẦU BẾP — sửa lỗi thẻ món (Bò nướng kiến vàng) đè lên
   nội dung ở khoảng màn hình 1280–1535px (xl → dưới 2xl).
   Ở khoảng này cột chữ hẹp nên thẻ món absolute che mất tên + mô tả đầu bếp.
   Cách xử lý: chừa lề phải cho cột chữ đúng bằng bề rộng thẻ món, đồng thời
   hạ thẻ món xuống một chút cho lệch so với tiêu đề. */
@media (min-width: 1280px) and (max-width: 1535px) {
  .vt-chef-text { padding-right: 291px; } /* 259px thẻ + 32px khoảng thở */
  .vt-chef-dish { top: 48px; }            /* lệch xuống, không ngang hàng tiêu đề */
}

/* ============ BỘ CHỌN NGÔN NGỮ (GTranslate render vào .vt-lang-switcher) ============
   Chỉnh cho khớp header: chữ màu wine, bỏ nền/viền mặc định, canh giữa gọn gàng. */
.vt-lang-switcher .gtranslate_wrapper,
.vt-lang-switcher .gt_container--gt_float,
.vt-lang-switcher .gt_selector,
.vt-lang-switcher select.gt_selector {
  margin: 0;
  color: #640E15;
}
.vt-lang-switcher select.gt_selector {
  background: transparent;
  border: 1px solid rgba(100,14,21,.35);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 15px;
  cursor: pointer;
}
/* Kiểu "flags" của GTranslate: canh giữa các cờ theo header. */
.vt-lang-switcher .gt-selector,
.vt-lang-switcher a.glink { display: inline-flex; align-items: center; gap: 6px; }
.vt-lang-switcher img { display: inline-block; }

/* Trên mobile: thu gọn dropdown ngôn ngữ để không làm chật header nhỏ. */
@media (max-width: 640px) {
  .vt-lang-switcher select.gt_selector { font-size: 13px; padding: 3px 6px; max-width: 120px; }
  .vt-lang-switcher a.glink { gap: 4px; }
}

/* ============ NỀN TRANG TRÍ — trải đều, KHÔNG lệch ============
   Trước đây dùng "left-1/2 w-screen -translate-x-1/2": w-screen = 100vw tính
   cả thanh cuộn dọc, còn left-1/2 tính theo container (không scrollbar) → lệch
   phải ~độ rộng scrollbar. Class này trải đều theo bề ngang phần tử cha định vị
   (thường là <section>), căn giữa chuẩn nên luôn cân. Dùng cho ảnh sóng vàng /
   nền kem trang trí (các phần tử đang có class .vt-decor-bg). */
.vt-decor-bg {
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  transform: none;
}

/* Sóng vàng "nhạt vừa" — dùng ở đáy mỗi khối menu + khối đặt chỗ trang Thực đơn.
   Đổi 'opacity' để nhạt/đậm hơn (0 = ẩn, 1 = rõ nhất); 'height' để cao/thấp hơn. */
.vt-decor-soft { opacity: .14; height: 170px; }
