/* ==========================================================
   Senthil Papain and Food Products (P) Ltd
   ========================================================== */

:root {
  --theme: #72a230;        /* underline, labels */
  --theme-text: #00a85a;   /* highlighted headings, active menu */
  --text: #333;
  --muted: #555;
  --topbar: #f1f1f1;
  --footer: #333;
  --header-h: 80px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  color: #000;
  background: #fff;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #999; text-decoration: none; transition: color .2s; }
a:hover { color: var(--theme-text); }

h1, h2, h3, h4, h5 {
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 10px;
}
h1,
h2 { font-size: 30px; font-weight: 600; }
h3 { font-size: 24px; font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }
h5 { font-size: 14px; font-weight: 600; }

p { margin: 0 0 12px; text-align: justify; }
b, strong { color: var(--muted); }

hr { border: 0; border-top: 1px solid rgba(0, 0, 0, .1); margin: 30px 0; }

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 16px;
}

.grid { display: grid; gap: 30px; }
.two-col { grid-template-columns: 1fr 1fr; align-items: start; }
.three { grid-template-columns: repeat(3, 1fr); }
.four { grid-template-columns: repeat(4, 1fr); }

.text-theme { color: var(--theme-text); font-weight: 700; }
.light { font-weight: 500; }

/* Heading with the small green underline */
.line-bottom {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 30px;
}
.line-bottom::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 50px;
  height: 2px;
  background: var(--theme);
}

.section-title { text-align: center; margin-bottom: 30px; }

.section { padding: 60px 0; scroll-margin-top: var(--header-h); }
.green-bg { background: #dcecb8 url('../images/green-bg.png') repeat; }
.photo-bg {
  background: url('../images/certificates/cert-bg.jpg') center / cover fixed;
  position: relative;
}
.photo-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .9);
}
.photo-bg > .container { position: relative; }

/* ---------- Top bar ---------- */
.header-top { background: var(--topbar); padding: 5px 0; font-size: 13px; }
.header-top-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 20px;
}
.company-name { margin: 5px 0; font-size: 14px; font-weight: 600; color: var(--text); text-align: left; }
.header-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.header-contact li { display: flex; align-items: center; gap: 6px; color: #555; }
.icon { width: 14px; height: 14px; fill: var(--theme-text); flex-shrink: 0; }

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}
.brand img { width: 160px; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
}
.main-nav a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: #333;
  transition: background .2s, color .2s;
}
.main-nav a:hover,
.main-nav a.active { background: var(--theme-text); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: #333;
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Slider ---------- */
.hero { scroll-margin-top: var(--header-h); }
.slider {
  position: relative;
  height: clamp(340px, 50vw, 680px);
  overflow: hidden;
  background: #1c2a12;
}
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s ease, transform 6s ease;
}
.slide.is-active { opacity: 1; transform: scale(1); z-index: 1; }

.slide-caption { color: #fff; }
.slide-caption.right { text-align: right; }
.caption-title,
.caption-sub {
  font-family: 'Raleway', Arial, sans-serif;
  text-align: inherit;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.caption-title { font-size: clamp(34px, 6.2vw, 83px); font-weight: 700; line-height: 1.3; }
.caption-sub { font-size: clamp(16px, 2.6vw, 35px); font-weight: 600; color: #f1f1f1; }
.slide.is-active .caption-title { opacity: 1; transform: none; transition-delay: .6s; }
.slide.is-active .caption-sub { opacity: 1; transform: none; transition-delay: .9s; }

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s, background .2s;
}
.slider:hover .slider-arrow { opacity: 1; }
.slider-arrow:hover { background: var(--theme); }
.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

.slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.slider-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.slider-dots button.is-active { background: var(--theme); border-color: var(--theme); }

/* ---------- About ---------- */
.about-grid { grid-template-columns: 2fr 1fr; align-items: start; }
.about-image { border: 5px solid rgba(255, 255, 255, .6); padding: 30px; }

/* ---------- Products ---------- */
.product { margin-top: 30px; }
.product .title { font-size: 24px; }
.thumb { display: block; overflow: hidden; }
.thumb img { width: 100%; transition: transform .4s ease; }
.thumb:hover img { transform: scale(1.04); }

/* ---------- Certification / Clients ---------- */
.logo-grid { justify-items: center; align-items: center; }
.logo-item { padding: 0 10px 10px; }
.clients .logo-item { min-height: 150px; display: flex; align-items: center; }

/* ---------- Other products ---------- */
.other-products { gap: 30px; }
.icon-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: rgba(255, 255, 255, .4);
  border: 1px solid #eee;
}
.icon-box h3 { margin: 0; font-size: 16px; }
.box-icon {
  position: relative;
  width: 30px;
  height: 22px;
  flex-shrink: 0;
  border-top: 2px solid var(--theme-text);
  border-bottom: 2px solid var(--theme-text);
}
.box-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  border-top: 2px solid var(--theme-text);
}

/* ---------- Facility ---------- */
.facility { margin: 0; }
.facility .thumb { border: 1px solid transparent; }
.facility figcaption {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: -30px;
  padding: 5px 20px;
  background: var(--theme);
  color: #fff;
  font-size: 18px;
}

/* ---------- Contact ---------- */
.contact-item { display: flex; gap: 20px; margin-bottom: 15px; }
.contact-title { font-size: 24px; }
.contact-item h3 { margin: 0 0 10px; font-size: 14px; }
.contact-item p { margin: 0 0 6px; text-align: left; }
.contact-item a { color: #999; }
.contact-item a:hover { color: var(--theme-text); }
.contact-icon { width: 36px; height: 36px; fill: var(--theme-text); flex-shrink: 0; }
.contact-numbers { padding-top: 60px; }
.map-title { margin-top: 30px; }
.map iframe { display: block; width: 100%; height: 450px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); padding: 20px 0; }
.site-footer p { margin: 0; font-size: 11px; color: #777; text-align: left; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; }
.site-footer a { color: #aaa; }
.site-footer a:hover { color: var(--theme-text); }

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  right: 15px;
  bottom: 15px;
  z-index: 200;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, background .2s;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: rgba(0, 0, 0, .6); }
.scroll-top svg { width: 36px; height: 36px; fill: #fff; }

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: rgba(0, 0, 0, .85);
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay figure { margin: 0; text-align: center; }
.lightbox-overlay img { max-height: 80vh; margin: 0 auto; box-shadow: 0 5px 30px rgba(0, 0, 0, .5); }
.lightbox-overlay figcaption { margin-top: 10px; color: #fff; }
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 16px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  :root { --header-h: 70px; }

  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 8px 12px rgba(0, 0, 0, .08);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.is-open { max-height: 400px; }
  .main-nav ul { flex-direction: column; padding: 0 16px 10px; gap: 0; }
  .main-nav a { padding: 10px 12px; border-top: 1px solid #f1f1f1; }

  .about-grid,
  .two-col { grid-template-columns: 1fr; }
  .about-image { max-width: 400px; }
  .three, .four { grid-template-columns: repeat(2, 1fr); }
  .contact-numbers { padding-top: 0; }
  .slider-arrow { display: none; }
}

@media (max-width: 767px) {
  .header-top-inner { justify-content: center; text-align: center; }
  .header-contact { justify-content: center; }
  .section { padding: 45px 0; }
  h1, h2 { font-size: 24px; }
  .product .title { font-size: 20px; }
  .photo-bg { background-attachment: scroll; }
  .map iframe { height: 320px; }
}

@media (max-width: 479px) {
  .three { grid-template-columns: 1fr; }
  .four { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .clients .logo-item { min-height: 110px; }
  .brand img { width: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .caption-title, .caption-sub, .thumb img { transition: none; }
}
