/*
Theme Name: Fortuna Global Food
Theme URI: https://fortunaglobalfood.com
Author: Fortuna Global Food
Description: Giao diện WordPress cho Fortuna Global Food. Toàn bộ hình ảnh, chữ, màu sắc chỉnh được tại Giao diện > Tùy biến.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fgf
*/

:root {
  --fgf-bg: #dfdfdf;
  --fgf-green: #375c23;
  --fgf-gold: #c1b481;
  --fgf-text: #222222;
  --fgf-dark: #000000;
  --fgf-serif: "DM Serif Display", "Times New Roman", Georgia, serif;
  --fgf-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --fgf-header-h: 75px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fgf-bg);
  color: var(--fgf-text);
  font-family: var(--fgf-sans);
  font-size: 15px;
  line-height: 1.85;
  font-weight: 500;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fgf-green); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fgf-green); outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--fgf-serif); font-weight: 400; color: var(--fgf-dark); line-height: 1.2; margin: 0 0 .6em; }
.screen-reader-text { position: absolute; left: -9999px; }

.wrap { width: min(1100px, 90%); margin: 0 auto; }
.wrap-wide { width: min(1500px, 90%); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--fgf-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .16);
  min-height: var(--fgf-header-h);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--fgf-header-h); }
.brand { display: inline-block; text-decoration: none; line-height: 1; }
.brand img, .custom-logo { max-height: 56px; width: auto; }
.logo-text { display: inline-block; font-family: var(--fgf-serif); color: var(--fgf-green); font-size: 36px; letter-spacing: .01em; line-height: .95; }
.logo-text small { display: block; text-align: right; font-size: 15px; letter-spacing: 0; margin-top: 2px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 26px; }
.main-nav li { position: relative; }
.main-nav a {
  font-family: var(--fgf-serif); font-size: 17px; color: var(--fgf-green);
  text-decoration: none; display: block; padding: 22px 0; line-height: 1.2;
  text-shadow: .4px 0 0 currentColor;
}
.main-nav a:hover { opacity: .75; }
.main-nav .menu-item-has-children > a::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 0 3px 8px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg);
}
.main-nav .sub-menu {
  display: none; position: absolute; left: -18px; top: 100%; min-width: 250px;
  flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0;
  background: var(--fgf-bg); box-shadow: 0 6px 14px rgba(0, 0, 0, .16);
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 10px 18px; font-size: 16px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; height: 2px; background: var(--fgf-green); position: relative; content: ""; transition: transform .2s;
}
.nav-toggle span::before { position: absolute; top: -7px; left: 0; right: 0; }
.nav-toggle span::after { position: absolute; top: 7px; left: 0; right: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 70px 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 60%; height: 300px; background: var(--fgf-gold);
}
/* Hình nền tùy chọn phía sau banner (Giao diện > Tùy biến > Banner đầu các trang) */
.hero--has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 2048 / 768;   /* đổi thành đúng chiều rộng / chiều cao của ảnh nền */
  display: flex;
  align-items: center;
}
.hero--no-gold::before { display: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 640px 1fr; column-gap: 90px; align-items: center; padding-left: 12px; }
.hero-img { width: 640px; aspect-ratio: 3 / 2; height: auto; background: #ececec; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 {
  font-size: clamp(44px, 5.1vw, 92px); line-height: .98; white-space: nowrap; letter-spacing: -.01em;
  color: var(--fgf-green); margin: 0; text-shadow: .6px 0 0 currentColor;
}
.hero--inner h1 { font-size: clamp(32px, 3.6vw, 58px); line-height: 1.05; white-space: normal; }

.page-title { padding: 70px 0 10px; }
.page-title h1 { font-size: clamp(40px, 5vw, 76px); color: var(--fgf-green); margin: 0; }

/* ---------- Intro + entry content ---------- */
.intro, .entry { width: min(1180px, 90%); margin: 0 auto; }
.intro { padding: 34px 0 78px; }
.entry { padding: 28px 0 90px; }
.entry > h2, .entry > p, .entry > ul, .entry > ol, .intro > h2, .intro > div { margin-left: 76px; max-width: 1100px; }
.entry > h2, .intro > h2 { position: relative; font-size: 24px; margin-bottom: .45em; margin-top: 1.6em; }
.entry > h2::before, .intro > h2::before {
  content: ""; position: absolute; left: -76px; top: .68em; width: 38px; height: 2px; background: var(--fgf-green);
}
.entry > h2:first-child, .intro > h2 { margin-top: 0; }
.entry h3 { font-size: 22px; color: var(--fgf-green); margin-top: 1.6em; }
.entry h4 { font-size: 19px; margin-top: 1.4em; }
.entry p, .intro p { margin: 0 0 1.1em; }
.entry .wp-block-columns { gap: 56px; margin: 46px 0; align-items: center; }
.entry .fgf-img, .entry .wp-block-image img { width: 100%; }
.fgf-img { aspect-ratio: 7 / 5; object-fit: cover; }
.fgf-img.fgf-img--tall { aspect-ratio: 4 / 5; }
.entry .wp-block-table { margin: 30px 0; overflow-x: auto; }
.entry table { width: 100%; border-collapse: collapse; font-size: 14px; }
.entry th { background: var(--fgf-green); color: #fff; font-weight: 600; text-align: left; padding: 11px 14px; }
.entry td { padding: 9px 14px; border-bottom: 1px solid rgba(0, 0, 0, .13); }
.entry tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .35); }
.entry .wp-block-table figcaption { font-size: 13px; color: #777; text-align: left; margin-top: 8px; }

/* ---------- Home cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 45px; width: min(1500px, 90%); margin: 0 auto; padding-bottom: 20px; }
.card { display: block; text-decoration: none; }
.card__img { aspect-ratio: 472 / 337; overflow: hidden; background: #ececec; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__img img { transform: scale(1.04); }
.card__label {
  background: var(--fgf-green); color: #fff; text-align: center; padding: 19px 12px;
  font-family: var(--fgf-serif); font-size: 19px; line-height: 1.2;
}

/* ---------- Services feature grid ---------- */
.fgf-features { list-style: none; margin: 60px 0 70px !important; padding: 0; max-width: none !important; display: grid; grid-template-columns: repeat(5, 1fr); gap: 46px 28px; }
.fgf-features li { text-align: center; font-size: 14px; line-height: 1.6; }
.fgf-features img { width: 66px; height: 66px; object-fit: contain; margin: 0 auto 14px; }

/* ---------- Products ---------- */
.fgf-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 28px; margin: 36px 0 44px; }
.fgf-product { text-align: center; }
.fgf-product__img { aspect-ratio: 1 / 1; background: rgba(255, 255, 255, .45); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 14px; }
.fgf-product__img img { width: 100%; height: 100%; object-fit: contain; }
.fgf-product h5 { font-family: var(--fgf-serif); font-size: 18px; color: var(--fgf-green); margin: 0 0 4px; font-weight: 400; }
.fgf-product p { margin: 0; font-size: 13.5px; line-height: 1.5; }

/* ---------- Contact blocks ---------- */
.fgf-contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin: 56px 0 30px; text-align: center; }
.fgf-contact img { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 16px; }
.fgf-contact h2 { font-size: 26px; color: var(--fgf-green); }
.fgf-contact p { margin: 0 0 .5em; }

/* ---------- Footer (nền trùng màu nền trang, giống bản gốc) ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--fgf-bg); padding: 120px 0 100px; margin-top: 70px; }
.footer-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 40px; align-items: start; }
.site-footer h4 { font-size: 19px; color: var(--fgf-green); margin-bottom: 14px; }
.site-footer p { margin: 0 0 1.2em; font-size: 14.5px; line-height: 1.85; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { line-height: 1.95; font-size: 14.5px; }
.site-footer a { color: var(--fgf-green); }
.footer-brand .logo-text { font-size: 48px; }
.footer-brand .logo-text small { font-size: 19px; }
.footer-brand img { max-height: 90px; }
.footer-pattern { position: absolute; right: -70px; bottom: -40px; width: 520px; max-width: 45%; height: auto; opacity: .9; pointer-events: none; z-index: 0; }
.copyright { position: relative; z-index: 1; text-align: center; font-size: 13px; margin-top: 56px; color: #777; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-inner { column-gap: 90px; }
  .fgf-features { grid-template-columns: repeat(3, 1fr); }
  .fgf-products { grid-template-columns: repeat(3, 1fr); }
  .cards { gap: 28px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--fgf-bg); box-shadow: 0 8px 14px rgba(0, 0, 0, .16); padding: 6px 5%; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
  .main-nav a { padding: 12px 0; }
  .main-nav .sub-menu { display: flex; position: static; box-shadow: none; padding: 0 0 6px 16px; min-width: 0; }
  .main-nav .menu-item-has-children > a::after { display: none; }
  .hero::before { width: 80%; height: 360px; }
  .hero-inner { grid-template-columns: 1fr; row-gap: 40px; padding-left: 0; }
  .hero h1 { white-space: normal; font-size: clamp(40px, 11vw, 70px); }
  .hero-img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .hero--has-bg { aspect-ratio: auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 50px; }
  .fgf-contact { grid-template-columns: 1fr; }
  .entry > h2, .entry > p, .entry > ul, .entry > ol, .intro > h2, .intro > div { margin-left: 0; }
  .entry > h2::before, .intro > h2::before { position: static; display: block; margin-bottom: 14px; }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .fgf-features, .fgf-products { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 80px 0 70px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card__img img { transition: none; }
}
