/* Cambodia Cashew Federation Production Styles */
@font-face {
  font-family: 'KhmerOS Battambang';
  src: url('/assets/fonts/KHMEROS_BATTAMBANG.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Override font-family site-wide */
html, body {
  font-family: 'KhmerOS Battambang', 'Plus Jakarta Sans', Arial, sans-serif !important;
}

/* 1. Base/Reset */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  background: #fafbfc;
  color: #1a2618;
  scroll-behavior: smooth;
}
*, *::before, *::after {
  box-sizing: border-box;
}
img {
  max-width: 100%;
  display: block;
}

/* 2. Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}
.section {
  padding: 72px 0 56px 0;
  background: #fff;
  border-radius: 18px;
  margin-bottom: 40px;
  box-shadow: 0 2px 16px rgba(22,73,30,0.06);
}
.section:nth-of-type(even) {
  background: #f6fbf7;
}
@media (max-width: 800px) {
  .section { padding: 48px 0 32px 0; }
}
@media (max-width: 600px) {
  .container { padding: 0 5px; }
  .section { padding: 32px 0 16px 0; }
}

/* 3. Typography */
h1, h2, h3, h4 {
  color: #16491e;
  margin-top: 0;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
h1 {
  font-size: 2.6rem;
  margin-bottom: 18px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 18px;
}
h3 {
  font-size: 1.32rem;
  margin-bottom: 10px;
}
p {
  line-height: 1.65;
  margin-top: 0;
  margin-bottom: 14px;
}
a {
  color: #207132;
  text-decoration: none;
  transition: color 0.15s;
}
a:hover, a:focus {
  color: #16491e;
  text-decoration: underline;
}

/* 4. Header Utility Bar */
.header-utility {
  background: #103b13;
  color: #a7d9b7;
  font-size: 0.98rem;
  padding: 6px 0;
  border-bottom: 1.5px solid #176624;
}
.header-utility .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-utility .ccf-site {
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  font-size: 1.04rem;
}
.header-utility-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.contact-btn {
  background: #fff8e1;
  color: #176624;
  border: none;
  border-radius: 28px;
  padding: 6px 28px 6px 18px;
  font-size: 1.01rem;
  font-weight: 700;
  box-shadow: 0 2px 10px 0 rgba(32,113,50,0.06);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.18s;
  display: inline-block;
  text-decoration: none;
  outline: none;
}
.contact-btn:hover, .contact-btn:focus {
  background: #ffe356;
  color: #174920;
  box-shadow: 0 4px 18px 0 rgba(32,113,50,0.09);
}
.header-link {
  color: #a7d9b7;
  font-weight: 500;
  text-decoration: underline;
  font-size: 1rem;
}
.header-link:hover { color: #fff; }

/* 5. Header Alert/Info Bar */
.header-alert {
  background: #fffbe6;
  color: #207132;
  padding: 12px 0;
  border-bottom: 1.5px solid #ffe18a;
  font-size: 1.05rem;
}
.header-alert .container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-alert-icon {
  font-size: 1.3rem;
  margin-right: 8px;
  line-height: 1;
}
.header-alert-text {
  font-weight: 500;
  color: #1a2618;
}
@media (max-width: 700px) {
  .header-alert .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 0.99rem;
  }
}

/* 4. Header Utility Bar */
.header-utility {
  background: linear-gradient(90deg, #eaf6ef 0, #fffbe8 100%);
  color: #166a2c;
  font-size: 1.08rem;
  padding: 11px 0 9px 0;
  border-bottom: 0;
  box-shadow: 0 2px 14px 0 rgba(76, 139, 68, 0.07);
}
.header-utility .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-utility .ccf-site {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 1.04rem;
  white-space: nowrap;
}
.header-utility-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.contact-btn {
  background: linear-gradient(90deg, #ffe18a 0, #eaf6ef 100%);
  color: #176624;
  border: none;
  border-radius: 22px;
  padding: 8px 28px;
  font-size: 1.07rem;
  font-weight: 700;
  box-shadow: 0 2px 10px 0 rgba(32,113,50,0.07);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.17s;
  display: inline-block;
  text-decoration: none;
  outline: none;
}
.contact-btn:hover, .contact-btn:focus {
  background: #ffe356;
  color: #176624;
  box-shadow: 0 4px 18px 0 rgba(32,113,50,0.13);
}

.header-link {
  color: #1a2618;
  font-weight: 500;
  text-decoration: underline;
  font-size: 1rem;
}
.header-link:hover { color: #174920; }

/* 5. Header Alert/Info Bar */
.header-alert {
  background: linear-gradient(90deg,#fffbe6,#eaf6ef 80%);
  color: #207132;
  padding: 13px 0;
  border-bottom: 0;
  font-size: 1.07rem;
  box-shadow: 0 1px 10px 0 rgba(76, 139, 68, 0.07);
}
.header-alert .container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-alert-icon {
  font-size: 1.24rem;
  margin-right: 8px;
  line-height: 1;
}
.header-alert-text {
  font-weight: 500;
  color: #166a2c;
}
@media (max-width: 700px) {
  .header-alert .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 0.99rem;
  }
}

/* 6. Main Nav/Logo Layer */
header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #fff;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0;
  background: transparent;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.28rem;
  font-weight: 700;
  color: #166a2c;
  text-decoration: none;
  white-space: nowrap;
}
.logo img {
  display: block;
  height: 42px;
  width: auto;
  border-radius: 14px;
  box-shadow: 0 1px 8px 0 rgba(68,139,76,0.09);
}
.logo-text {
  display: inline;
  margin-left: 10px;
  font-size: 1.16rem;
  font-weight: 700;
  color: #166a2c;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
@media (max-width: 1000px) {
  .logo-text { font-size: 1rem; }
}
@media (max-width: 900px) {
  .logo-text { display: none; }
  .logo img { height: 34px; }
}

/* 7. Main Nav Bar (Carded/Glass style) */
.main-nav-bar {
  width: 100%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 6px 32px rgba(76,139,68,0.11), 0 2px 12px rgba(32,113,50,0.09);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  margin-top: 0;
  margin-bottom: 0;
}
.main-nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 16px;
  margin: 0;
  padding: 0 0 0 0;
  position: relative;
}
.main-nav-links > li {
  position: relative;
}
.main-nav-links a {
  color: #166a2c;
  font-weight: 700;
  padding: 18px 30px 18px 18px;
  border-radius: 16px;
  background: transparent;
  display: flex;
  align-items: center;
  transition: background 0.17s, color 0.16s;
  font-size: 1.08rem;
  outline: none;
}
.main-nav-links > li > a:hover,
.main-nav-links > li > a:focus {
  background: #f6fbf7;
  color: #176624;
  text-decoration: none;
}

/* Only show dropdown arrow in markup (no pseudo arrows!) */
.dropdown-arrow {
  font-size: 0.93em;
  color: #ffe18a;
  margin-left: 10px;
  margin-top: 2px;
  transition: color 0.2s, transform 0.25s;
  pointer-events: none;
  display: inline-block;
}
.has-dropdown.open > a .dropdown-arrow,
.has-dropdown:hover > a .dropdown-arrow,
.has-dropdown:focus-within > a .dropdown-arrow {
  color: #ffb60d;
  transform: rotate(180deg);
}

/* Dropdown */
.main-nav-links .dropdown {
  display: none;
  position: absolute;
  left: 0; top: calc(100% + 10px);
  min-width: 220px;
  background: #fffef7;
  box-shadow: 0 8px 32px rgba(32,113,50,0.12), 0 1.5px 5px rgba(22,105,46,0.07);
  padding: 14px 0 12px 0;
  border-radius: 0 0 18px 18px;
  z-index: 1001;
  flex-direction: column;
  animation: fadeIn 0.28s;
  border-top: 3px solid #ffe18a;
}
.main-nav-links .dropdown li {
  width: 100%;
}
.main-nav-links .dropdown a {
  color: #166a2c;
  background: transparent;
  padding: 13px 34px 13px 22px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1.03rem;
  display: block;
}
.main-nav-links .dropdown a:hover, .main-nav-links .dropdown a:focus {
  background: #eaf6ef;
  color: #176624;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.open > .dropdown {
  display: flex;
}
@media (max-width: 900px) {
  .main-nav-bar {
    background: #fff;
    box-shadow: 0 4px 20px rgba(32,113,50,0.10);
    border-radius: 0 0 24px 24px;
  }
  .main-nav-links {
    flex-direction: column;
    align-items: flex-start;
    background: #fff;
    position: absolute;
    left: 0; top: 100%;
    width: 100vw;
    max-width: none;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 8px 24px rgba(32,113,50,0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .3s, transform .3s;
    z-index: 999;
    gap: 0;
  }
  .main-nav-links.active {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .main-nav-links > li {
    width: 100%;
  }
  .main-nav-links > li > a {
    padding: 20px 0 20px 22px;
    font-size: 1.13rem;
    border-radius: 0;
    border-bottom: 1px solid #eaf6ef;
    background: transparent;
  }
  .main-nav-links .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    background: #fffef7;
    padding: 0;
    border-radius: 0 0 18px 18px;
    animation: none;
    border-top: 0;
  }
  .main-nav-links .dropdown.open {
    display: flex;
  }
  .main-nav-links .dropdown a {
    color: #176624;
    padding: 17px 30px 17px 34px;
    font-size: 1.09rem;
    background: transparent;
    border-radius: 0;
  }
  .dropdown-arrow {
    margin-left: auto;
    margin-right: 18px;
  }
}

/* Hamburger (nav-toggle) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 8px;
  margin-left: 12px;
}
.nav-toggle span {
  display: block;
  width: 27px;
  height: 3.2px;
  background: #176624;
  border-radius: 2px;
  transition: all 0.3s;
}
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Dropdown animation */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(16px);}
  100% { opacity: 1; transform: none;}
}


/* 8. Hero Banner */
.hero-banner {
  background: url('/assets/img/hero-bg.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 148px 0 96px 0;
  position: relative;
  z-index: 1;
  min-height: 470px;
}
.hero-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(120deg, #16491e 0%, #16491e99 45%, transparent 100%);
  opacity: 0.48;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 2;
  background: rgba(22, 73, 30, 0.31);
  display: inline-block;
  padding: 48px 36px;
  border-radius: 22px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 3px 18px 0 rgba(22,73,30,0.06);
}
.hero-content h1,
.hero-content p {
  color: #fff;
  text-shadow: 0 1px 6px rgba(22,73,30,0.14);
}
.hero-content h1 {
  font-size: 2.7rem;
  margin-bottom: 10px;
  line-height: 1.18;
}
.hero-content p {
  font-size: 1.27rem;
  margin-bottom: 26px;
}
.btn-primary {
  background: #207132;
  color: #fff;
  padding: 18px 44px;
  border-radius: 32px;
  border: none;
  font-size: 1.18rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(22,73,30,0.13);
  transition: background 0.22s, box-shadow 0.22s;
  margin-top: 18px;
  display: inline-block;
  cursor: pointer;
}
.btn-primary:hover, .btn-primary:focus {
  background: #16491e;
  box-shadow: 0 5px 16px rgba(32,113,50,0.19);
}

/* 9. Section Typography */
.section .container > h2 {
  margin-bottom: 18px;
  text-align: left;
  color: #16491e;
}
.section .container > p {
  max-width: 700px;
  font-size: 1.11rem;
}

/* 10. Cards (e.g., for Services, Market Data) */
.cards {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(32,113,50,0.07);
  padding: 34px 22px;
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 370px;
  text-align: left;
  transition: transform 0.16s, box-shadow 0.16s;
}
.card:hover, .card:focus-within {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 6px 32px rgba(22,73,30,0.17);
}
.card h3 {
  margin-top: 0;
  color: #207132;
}
.card p {
  font-size: 1rem;
  color: #333;
}
@media (max-width: 700px) {
  .cards { flex-direction: column; gap: 14px; }
  .card { max-width: 100%; }
}

/* 11. Tables */
.table-responsive {
  overflow-x: auto;
  margin: 22px 0;
}
.table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1rem;
  background: #fff;
}
.table th, .table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e1e8eb;
}
.table th {
  background: #e8f6eb;
  color: #16491e;
  font-weight: 700;
  text-align: left;
}
.table tr:last-child td {
  border-bottom: none;
}

/* 12. Forms */
form {
  margin-top: 24px;
  max-width: 500px;
}
input, textarea, select {
  width: 100%;
  font-size: 1.08rem;
  padding: 13px 12px;
  margin-bottom: 18px;
  border: 1.5px solid #b8dab7;
  border-radius: 9px;
  outline: none;
  transition: border 0.18s;
  background: #f8fcf9;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  border-color: #207132;
  background: #fff;
}
button[type="submit"], input[type="submit"] {
  background: #207132;
  color: #fff;
  border: none;
  padding: 15px 36px;
  border-radius: 28px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 7px rgba(32,113,50,0.10);
}
button[type="submit"]:hover, input[type="submit"]:hover {
  background: #16491e;
  box-shadow: 0 5px 14px rgba(22,73,30,0.16);
}

/* 13. Footer */
.footer {
  background: #16491e;
  color: #fff;
  text-align: center;
  padding: 36px 0 22px 0;
  font-size: 1rem;
  border-top: 2px solid #e8f6eb;
}
.footer a {
  color: #a3e4ba;
  text-decoration: underline;
  font-weight: 500;
}
.footer a:hover, .footer a:focus {
  color: #fff;
  text-decoration: none;
}

/* 14. Animations, Utility, and Print */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: none; }
}
.section, .hero-banner, .card, .footer {
  animation: fadeIn 1.4s cubic-bezier(.36,.66,.04,1) 0.1s both;
}
::-webkit-input-placeholder { color: #85b18e; }
::-moz-placeholder { color: #85b18e; }
:-ms-input-placeholder { color: #85b18e; }
::placeholder { color: #85b18e; }
[tabindex]:focus { outline: 2px solid #207132; outline-offset: 1px; }

@media print {
  header, .footer, nav, .nav-links, .btn-primary { display: none !important; }
  body { background: #fff; color: #111; }
  .section, .container { box-shadow: none !important; background: #fff !important; }
}

/* 15. Custom Scrollbars */
::-webkit-scrollbar {
  width: 12px;
  background: #eaf6ef;
}
::-webkit-scrollbar-thumb {
  background: #b8dab7;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #85b18e;
}
