/* ===== Bien mau lay tu logo Loc Khang ===== */
:root{
  --green:        #3AA24A;
  --green-dark:   #1F7A38;
  --green-darker: #145227;
  --green-light:  #EAF5EC;
  --orange:       #F5821F;
  --orange-dark:  #E06A0C;
  --orange-light: #FFF1E4;
  --ink:          #23301F;
  --muted:        #6B7A66;
  --cream:        #FBF9F3;
  --white:        #ffffff;
  --line:         #E7E4DA;
  --shadow:       0 10px 30px rgba(20,82,39,.10);
  --radius:       16px;
  --font: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--font);color:var(--ink);background:var(--cream);line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
.container{width:min(1180px,92%);margin-inline:auto}

/* ===== Nut ===== */
.btn{display:inline-block;padding:.8rem 1.6rem;border-radius:999px;font-weight:700;cursor:pointer;border:none;transition:.2s;font-size:.98rem}
.btn-primary{background:var(--orange);color:#fff;box-shadow:0 8px 20px rgba(245,130,31,.35)}
.btn-primary:hover{background:var(--orange-dark);transform:translateY(-2px)}
.btn-ghost{background:transparent;border:2px solid var(--green);color:var(--green-dark)}
.btn-ghost:hover{background:var(--green);color:#fff}

/* ===== KHOI 1: HEADER ===== */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);transition:.3s}
.site-header.scrolled{box-shadow:0 4px 20px rgba(0,0,0,.06)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem;height:96px}
.brand{display:flex;align-items:center;gap:.7rem}
.brand-logo{height:82px;width:auto;object-fit:contain}
.brand-text{display:flex;flex-direction:column;line-height:1.05}
.brand-name{font-weight:800;font-size:1.35rem;color:var(--orange);letter-spacing:.3px}
.brand-sub{font-size:.72rem;color:var(--green-dark);font-style:italic;letter-spacing:1px}
/* Logo tren nen toi: dat trong khung trang bo tron */
.logo-chip{background:#fff;border-radius:12px;padding:6px}
.main-nav{display:flex;align-items:center;gap:.3rem}
.nav-link{padding:.55rem .85rem;border-radius:999px;font-weight:600;font-size:.95rem;color:var(--ink);transition:.2s;white-space:nowrap}
.nav-link:hover{color:var(--green-dark);background:var(--green-light)}
.nav-cta{background:var(--green);color:#fff}
.nav-cta:hover{background:var(--green-dark);color:#fff}
.nav-toggle{display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer;padding:6px}
.nav-toggle span{width:26px;height:3px;background:var(--green-dark);border-radius:2px;transition:.3s}

/* ===== KHOI 2: HERO ===== */
.hero{position:relative;min-height:78vh;display:flex;align-items:center;overflow:hidden}
.hero-media{position:absolute;inset:0}
.hero-media img{width:100%;height:100%;object-fit:cover}
.hero-overlay{position:relative;width:100%;background:linear-gradient(90deg,rgba(20,82,39,.72) 0%,rgba(20,82,39,.30) 60%,rgba(20,82,39,0) 100%)}
.hero-content{padding:5rem 0;color:#fff;max-width:1000px}
.hero-content h1{font-size:clamp(1.7rem,4.2vw,3.05rem);font-weight:800;line-height:1.2;margin-bottom:1rem;text-shadow:0 2px 12px rgba(0,0,0,.25);white-space:nowrap}
@media(max-width:760px){.hero-content h1{white-space:normal}}
.hero-content p{font-size:clamp(1rem,1.6vw,1.25rem);margin-bottom:1.8rem;opacity:.95}

/* ===== Chung cho section ===== */
.section{padding:5rem 0}
.section-head{text-align:center;margin-bottom:2.8rem}
.section-eyebrow{display:inline-block;color:var(--orange);font-weight:700;text-transform:uppercase;letter-spacing:2px;font-size:.8rem;margin-bottom:.5rem}
.section-eyebrow.light{color:#ffd9b3}
.section-head h2{font-size:clamp(1.7rem,3vw,2.4rem);color:var(--green-darker);font-weight:800}
.section-head h2::after{content:"";display:block;width:64px;height:4px;background:var(--orange);border-radius:2px;margin:.8rem auto 0}

/* ===== KHOI 3: SAN PHAM ===== */
.products-section{background:var(--white)}
.filter-bar{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-bottom:2.2rem}
.filter-chip{padding:.5rem 1.2rem;border-radius:999px;border:1.5px solid var(--line);background:#fff;font-weight:600;cursor:pointer;transition:.2s;font-size:.92rem}
.filter-chip:hover{border-color:var(--green)}
.filter-chip.active{background:var(--green);color:#fff;border-color:var(--green)}
.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.4rem}
.product-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:.25s;cursor:pointer;display:flex;flex-direction:column}
.product-card:hover{transform:translateY(-6px);box-shadow:var(--shadow);border-color:transparent}
.product-thumb{aspect-ratio:1/1;overflow:hidden;background:var(--green-light)}
.product-thumb img{width:100%;height:100%;object-fit:cover;transition:.4s}
.product-card:hover .product-thumb img{transform:scale(1.06)}
.product-body{padding:1rem 1.1rem 1.3rem;display:flex;flex-direction:column;flex:1}
.product-cat{font-size:.72rem;color:var(--orange);font-weight:700;text-transform:uppercase;letter-spacing:.5px}
.product-name{font-weight:700;font-size:1.05rem;margin:.25rem 0 .4rem;color:var(--green-darker)}
.product-desc{font-size:.88rem;color:var(--muted);flex:1}
.product-price{margin-top:.7rem;font-weight:700;color:var(--green-dark);font-size:.92rem}

/* ===== KHOI 4: CAU CHUYEN ===== */
.story-section{background:var(--green-light)}
.story-inner{display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:center}
.story-media img{width:100%;border-radius:var(--radius);box-shadow:var(--shadow);aspect-ratio:4/3;object-fit:cover}
.story-text .section-eyebrow{margin-bottom:.3rem}
.story-text h2{font-size:clamp(1.7rem,3vw,2.4rem);color:var(--green-darker);font-weight:800;margin-bottom:1.1rem}
.story-text h2::after{content:"";display:block;width:64px;height:4px;background:var(--orange);border-radius:2px;margin:.8rem 0 0}
.rich-text p{margin-bottom:1rem;color:#3c4a38}
.rich-text strong{color:var(--green-dark)}
.rich-text h2{font-size:1.28rem;color:var(--green-darker);margin:1.6rem 0 .7rem;padding-left:.7rem;border-left:4px solid var(--orange);line-height:1.35}
.rich-text h2:first-child{margin-top:0}
.rich-text h3{font-size:1.06rem;color:var(--green-dark);margin:1.2rem 0 .5rem}
.rich-text ul{list-style:none;margin:0 0 1.1rem;padding:0}
.rich-text ul li{position:relative;padding-left:1.6rem;margin-bottom:.55rem;color:#3c4a38}
.rich-text ul li::before{content:"🌿";position:absolute;left:0;top:0}
.rich-text .contact-box{background:var(--green-light);border-radius:12px;padding:1rem 1.2rem;margin-top:1rem;line-height:1.9}
.rich-text .story-quote{margin-top:1.2rem;padding:1rem 1.2rem;background:var(--orange-light);border-radius:12px;text-align:center;color:var(--orange-dark);font-size:1.05rem}
/* Tom tat cau chuyen tren trang chu: gioi han ~5 dong */
.story-excerpt{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.story-more{margin-top:1.4rem}

/* ===== KHOI 5: CHUNG NHAN ===== */
.certs-section{background:var(--white)}
.cert-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem}
.cert-card{border:1px solid var(--line);border-radius:var(--radius);padding:1rem;text-align:center;background:#fff;transition:.2s}
.cert-card:hover{box-shadow:var(--shadow);transform:translateY(-4px)}
.cert-card img{width:100%;aspect-ratio:3/4;object-fit:contain;background:var(--cream);border-radius:10px;margin-bottom:.7rem}
.cert-card span{font-weight:600;font-size:.9rem;color:var(--green-dark)}

/* ===== KHOI 6: GALLERY ===== */
.gallery-section{background:var(--cream)}
.gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:180px;gap:1rem}
.gallery-item{overflow:hidden;border-radius:14px;cursor:pointer;position:relative}
.gallery-item:nth-child(1){grid-column:span 2;grid-row:span 2}
.gallery-item img{width:100%;height:100%;object-fit:cover;transition:.4s}
.gallery-item:hover img{transform:scale(1.08)}
.gallery-item .cap{position:absolute;left:0;right:0;bottom:0;padding:.6rem .8rem;color:#fff;font-size:.85rem;background:linear-gradient(transparent,rgba(0,0,0,.6));opacity:0;transition:.2s}
.gallery-item:hover .cap{opacity:1}

/* ===== KHOI 7: TIN TUC ===== */
.news-section{background:var(--white)}
.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.6rem}
.news-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:.25s;cursor:pointer;display:flex;flex-direction:column}
.news-card:hover{transform:translateY(-6px);box-shadow:var(--shadow)}
.news-thumb{aspect-ratio:16/9;overflow:hidden;background:var(--green-light)}
.news-thumb img{width:100%;height:100%;object-fit:cover;transition:.4s}
.news-card:hover .news-thumb img{transform:scale(1.05)}
.news-body{padding:1.2rem 1.3rem 1.5rem;display:flex;flex-direction:column;flex:1}
.news-tag{align-self:flex-start;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#fff;background:var(--green);padding:.2rem .6rem;border-radius:6px;margin-bottom:.6rem}
.news-tag.tuyen-dung{background:var(--orange)}
.news-date{font-size:.8rem;color:var(--muted);margin-bottom:.3rem}
.news-title{font-weight:700;font-size:1.08rem;color:var(--green-darker);margin-bottom:.5rem}
.news-excerpt{font-size:.9rem;color:var(--muted);flex:1}
.news-more{margin-top:.8rem;color:var(--orange-dark);font-weight:700;font-size:.9rem}

/* ===== KHOI 8: LIEN HE ===== */
.contact-section{background:linear-gradient(135deg,var(--green-dark),var(--green-darker));color:#fff;padding:5rem 0}
.contact-inner{display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:center}
.contact-info h2{font-size:clamp(1.5rem,2.6vw,2.1rem);margin:.3rem 0 1.5rem;line-height:1.25}
.contact-list{list-style:none;display:flex;flex-direction:column;gap:1.1rem}
.contact-list li{display:flex;flex-direction:column;padding-left:2.4rem;position:relative}
.contact-list li span{font-size:.78rem;text-transform:uppercase;letter-spacing:1px;opacity:.75}
.contact-list li strong{font-size:1.08rem;font-weight:600}
.contact-list li::before{position:absolute;left:0;top:2px;font-size:1.3rem}
.c-address::before{content:"📍"}
.c-phone::before{content:"📞"}
.c-email::before{content:"✉️"}
.contact-socials{display:flex;gap:.7rem;margin-top:1.6rem}
.contact-socials a{padding:.55rem 1.1rem;border-radius:999px;background:rgba(255,255,255,.15);font-weight:600;font-size:.9rem;transition:.2s}
.contact-socials a:hover{background:var(--orange)}
/* Form lien he */
.contact-form-wrap{background:#fff;border-radius:var(--radius);padding:1.8rem;box-shadow:var(--shadow)}
.contact-form-wrap h3{color:var(--green-darker);font-size:1.3rem;margin-bottom:.3rem}
.contact-form-wrap .cf-sub{color:var(--muted);font-size:.9rem;margin-bottom:1.2rem}
.contact-form{display:flex;flex-direction:column;gap:.8rem}
.contact-form input,.contact-form textarea{padding:.8rem .9rem;border:1.5px solid var(--line);border-radius:10px;font-size:.98rem;font-family:inherit;color:var(--ink)}
.contact-form input:focus,.contact-form textarea:focus{outline:none;border-color:var(--green)}
.contact-form textarea{resize:vertical;min-height:96px}
.contact-form .btn-block{margin-top:.2rem}
.cf-status{font-size:.9rem;min-height:1.2rem;margin:0;text-align:center}
.cf-status.ok{color:var(--green-dark);background:var(--green-light);padding:.6rem;border-radius:8px;font-weight:600}
.cf-status.err{color:#c0392b}

.contact-map{margin-top:2rem;height:100%;min-height:340px;border-radius:var(--radius);overflow:hidden;background:rgba(255,255,255,.1)}
.contact-map iframe{width:100%;height:100%;border:0;min-height:340px;display:block}
.map-placeholder{display:flex;align-items:center;justify-content:center;height:100%;min-height:340px;color:rgba(255,255,255,.6);font-style:italic}

/* ===== FOOTER ===== */
.site-footer{background:var(--green-darker);color:#dfe9d8;padding:2rem 0}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.footer-brand{display:flex;align-items:center;gap:.8rem}
.footer-brand img{width:56px;height:56px;object-fit:contain}
.footer-brand strong{display:block;color:#fff}
.footer-brand span{font-size:.8rem;opacity:.8}
.footer-copy{font-size:.85rem;opacity:.85}
.footer-admin{font-size:.82rem;opacity:.7;border:1px solid rgba(255,255,255,.25);padding:.35rem .9rem;border-radius:999px}
.footer-admin:hover{opacity:1;background:rgba(255,255,255,.1)}

/* ===== TRANG CAU CHUYEN DAY DU (story.html) ===== */
.story-hero{background:linear-gradient(135deg,var(--green-light),#fff);padding:3rem 0 2.4rem;border-bottom:1px solid var(--line)}
.back-link{display:inline-block;color:var(--green-dark);font-weight:600;margin-bottom:1rem;font-size:.92rem}
.back-link:hover{color:var(--orange-dark)}
.story-hero h1{font-size:clamp(1.9rem,4vw,2.8rem);color:var(--green-darker);font-weight:800;margin-top:.2rem}
.story-hero h1::after{content:"";display:block;width:64px;height:4px;background:var(--orange);border-radius:2px;margin:.9rem 0 0}
.story-article{padding:3rem 0 4rem;background:#fff}
.story-article-inner{max-width:820px}
.story-article-img{width:100%;border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:2rem;max-height:460px;object-fit:cover}
.story-full{font-size:1.05rem;line-height:1.9}
.story-full p{margin-bottom:1.2rem;color:#3c4a38}
.story-full h2{font-size:1.4rem;color:var(--green-darker);margin:2.2rem 0 .9rem;padding-left:.9rem;border-left:4px solid var(--orange);line-height:1.35}
.story-full h2:first-child{margin-top:0}
.story-full h3{color:var(--green-darker);margin:1.8rem 0 .8rem}
.story-full strong{color:var(--green-dark)}
.story-full em{color:var(--green-dark);font-style:italic}
.story-full ul{list-style:none;margin:0 0 1.2rem;padding:0}
.story-full ul li{position:relative;padding-left:1.7rem;margin-bottom:.75rem;color:#3c4a38}
.story-full ul li::before{content:"🌿";position:absolute;left:0;top:0}
.story-full .story-quote{margin-top:1.6rem;padding:1.1rem 1.4rem;background:var(--green-light);border-radius:12px;text-align:center;font-size:1.12rem;color:var(--green-darker)}
.story-full img{max-width:100%;border-radius:12px;margin:1rem 0}
.story-cta{display:flex;gap:.8rem;flex-wrap:wrap;margin-top:2.4rem;padding-top:2rem;border-top:1px solid var(--line)}

/* ===== MODAL ===== */
.modal{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:1rem}
.modal[hidden]{display:none}
.modal-backdrop{position:absolute;inset:0;background:rgba(20,30,15,.6)}
.modal-box{position:relative;background:#fff;border-radius:var(--radius);max-width:720px;width:100%;max-height:88vh;overflow:auto;box-shadow:0 30px 80px rgba(0,0,0,.3)}
.modal-close{position:absolute;top:.6rem;right:.9rem;font-size:2rem;line-height:1;border:none;background:none;cursor:pointer;color:#888;z-index:2}
.modal-content{padding:0}
.modal-detail img{width:100%;aspect-ratio:16/10;object-fit:cover}
.modal-detail .md-body{padding:1.6rem 1.8rem 2rem}
.modal-detail h3{color:var(--green-darker);font-size:1.5rem;margin-bottom:.5rem}
.modal-detail .md-meta{color:var(--orange-dark);font-weight:700;margin-bottom:1rem}
.modal-detail .rich-text{color:#3c4a38}

/* ===== Empty state ===== */
.empty{grid-column:1/-1;text-align:center;color:var(--muted);padding:2rem;font-style:italic}

/* ===== Animation xuat hien ===== */
.reveal{opacity:0;transform:translateY(24px);transition:.6s ease}
.reveal.show{opacity:1;transform:none}

/* ===== RESPONSIVE ===== */
@media(max-width:960px){
  .product-grid{grid-template-columns:repeat(3,1fr)}
  .cert-grid{grid-template-columns:repeat(3,1fr)}
  .gallery-grid{grid-template-columns:repeat(3,1fr)}
  .news-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:820px){
  .header-inner{height:72px}
  .brand-logo{height:54px}
  .nav-toggle{display:flex}
  .main-nav{position:fixed;top:72px;right:0;height:calc(100vh - 72px);width:min(300px,80%);background:#fff;flex-direction:column;align-items:stretch;padding:1.2rem;gap:.2rem;box-shadow:-10px 0 40px rgba(0,0,0,.12);transform:translateX(100%);transition:.3s;overflow-y:auto}
  .main-nav.open{transform:none}
  .nav-link{padding:.9rem 1rem}
  .hero-content{padding:3.5rem 0;max-width:100%}
  .story-inner,.contact-inner{grid-template-columns:1fr}
  .story-media{order:-1}
  .footer-inner{flex-direction:column;text-align:center;gap:.8rem}
}
@media(max-width:640px){
  .section{padding:3.5rem 0}
  .product-grid,.cert-grid,.gallery-grid,.news-grid{grid-template-columns:repeat(2,1fr)}
  .gallery-grid{grid-auto-rows:130px}
  .gallery-item:nth-child(1){grid-column:span 2;grid-row:span 1}
  .hero{min-height:auto}
  .hero-content{padding:2.8rem 0}
  .contact-list li{padding-left:2.2rem}
  .contact-map,.contact-map iframe,.map-placeholder{min-height:260px}
}
@media(max-width:420px){
  .product-grid,.cert-grid{grid-template-columns:1fr}
  .header-inner{height:64px}
  .brand-logo{height:46px}
  .main-nav{top:64px;height:calc(100vh - 64px)}
}
