:root {
  --clr-bg: #091c10;
  --clr-bg-elevated: #0b2213;
  --clr-surface: #102e1c;
  --clr-surface-light: #164028;
  --clr-text: #f0f7f3;
  --clr-text-muted: #95c5a6;
  --clr-accent: #f5b942;
  --clr-accent-dim: #c5912f;
  --font-body: 'Outfit', sans-serif;
  --font-display: 'Playfair Display', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.display-font {
  font-family: var(--font-display);
}

a {
  text-decoration: none;
  color: inherit;
}

/* Animations Core */
.animate-hidden {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: all 0.4s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(9, 28, 16, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 5%;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo h2 {
  color: var(--clr-accent);
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links li a {
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: var(--clr-accent);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  bottom: -4px;
  left: 0;
  transition: width 0.3s ease;
}

.nav-links li a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 5%;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transform: scale(1.1);
  animation: bgPan 20s infinite alternate linear;
}

@keyframes bgPan {
  0% {
    transform: scale(1.1) translateX(0);
  }

  100% {
    transform: scale(1.15) translateX(-2%);
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(9, 28, 16, 0.95) 0%, rgba(9, 28, 16, 0.6) 50%, rgba(9, 28, 16, 0.3) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 650px;
  padding-top: 5rem;
}

.hero-subtitle {
  color: var(--clr-accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-subtitle ion-icon {
  font-size: 1.2rem;
}

.hero-title {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-title span {
  color: var(--clr-accent);
  font-style: italic;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--clr-text-muted);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.btn-primary {
  display: inline-block;
  background: var(--clr-accent);
  color: var(--clr-bg);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid var(--clr-accent);
  cursor: pointer;
}

.btn-primary:hover {
  background: transparent;
  color: var(--clr-accent);
  box-shadow: 0 10px 20px rgba(245, 185, 66, 0.2);
  transform: translateY(-2px);
}

/* Sections Common */
.section {
  padding: 8rem 5%;
}

.section-head {
  text-align: center;
  margin-bottom: 5rem;
}

.section-sub {
  color: var(--clr-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 3rem;
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background: var(--clr-accent);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h3 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.about-text p {
  color: var(--clr-text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  border-left: 3px solid var(--clr-accent);
  padding-left: 1.5rem;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--clr-accent);
  font-family: var(--font-display);
}

.stat-label {
  color: var(--clr-text-muted);
  font-weight: 500;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s ease;
}

.about-image:hover img {
  transform: scale(1.02);
}

.experience-badge {
  position: absolute;
  bottom: -30px;
  right: -30px;
  background: var(--clr-accent);
  color: var(--clr-bg);
  padding: 2rem;
  border-radius: 50%;
  width: 150px;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 30px rgba(245, 185, 66, 0.4);
  font-weight: 700;
  animation: float 6s ease-in-out infinite;
}

.experience-badge span:first-child {
  font-size: 2.5rem;
  line-height: 1;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(5deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Products Section */
.products-section {
  background: var(--clr-surface);
}

.products-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
}

.product-card {
  background: var(--clr-surface-light);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  flex: 0 1 360px;
}

.product-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(245, 185, 66, 0.3);
}

.product-img {
  height: 250px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.product-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--clr-surface-light), transparent);
  opacity: 0.8;
  transition: opacity 0.4s;
}

.product-card:hover .product-img::after {
  opacity: 0.3;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-card:hover .product-img img {
  transform: scale(1.1);
}

.product-info {
  padding: 2rem;
  position: relative;
  z-index: 10;
}

.product-tag {
  background: rgba(245, 185, 66, 0.15);
  color: var(--clr-accent);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}

.product-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.product-desc {
  color: var(--clr-text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.product-origins {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.origin-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #fff;
}

.origin-badge ion-icon {
  color: var(--clr-accent);
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  background: var(--clr-surface);
  border-radius: 30px;
  padding: 4rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.contact-info .info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.info-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(245, 185, 66, 0.1);
  color: var(--clr-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.info-item:hover .info-icon {
  background: var(--clr-accent);
  color: var(--clr-bg);
  transform: scale(1.1);
}

.info-text h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.info-text p {
  color: var(--clr-text-muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-grad {
  position: relative;
  z-index: 1;
}

.input-grad input,
.input-grad textarea {
  width: 100%;
  background: var(--clr-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input-grad textarea {
  min-height: 150px;
  resize: vertical;
}

.input-grad input:focus,
.input-grad textarea:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 15px rgba(245, 185, 66, 0.2);
}

.btn-submit {
  background: var(--clr-accent);
  color: var(--clr-bg);
  border: none;
  padding: 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-submit:hover {
  background: #fff;
  color: var(--clr-bg);
  transform: translateY(-2px);
}

/* Footer */
footer {
  background: #06140b;
  padding: 4rem 5% 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h2 {
  color: var(--clr-accent);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--clr-text-muted);
  max-width: 400px;
  line-height: 1.8;
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--clr-text-muted);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--clr-accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.mobile-menu-icon {
  display: none;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-title {
    font-size: 3rem;
  }

  .about-grid,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .contact-container {
    padding: 2.5rem 1.5rem;
    gap: 2.5rem;
    overflow: hidden;
  }

  .info-text p,
  .info-text h4 {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .map-container {
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
  }

  .map-container iframe {
    width: 100% !important;
  }

  .experience-badge {
    display: none;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .mobile-menu-icon {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(9, 28, 16, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding-top: 6rem;
    padding-left: 2rem;
    transition: 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    margin: 0;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin-bottom: 2rem;
  }

  .rice-variant {
    flex-direction: column;
  }

  .rice-variant-img {
    width: 100%;
    height: 200px;
  }
}

/* Dropdown & Product Pages */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--clr-surface);
  list-style: none;
  min-width: 250px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  padding: 0.5rem 0;
}

@media (max-width: 900px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    border: none;
    padding-left: 1rem;
    margin-top: 1rem;
    display: none;
  }
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  padding: 0.8rem 1.5rem !important;
  display: block;
  font-size: 1rem !important;
  color: #fff !important;
  font-family: var(--font-body) !important;
}

.dropdown-menu li {
  margin-bottom: 0 !important;
}

.dropdown-menu li a::after {
  display: none !important;
}

.dropdown-menu li a:hover {
  background: var(--clr-surface-light);
  color: var(--clr-accent) !important;
}

.product-page-hero {
  padding: 12rem 5% 6rem;
  background: var(--clr-bg);
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.product-page-hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #fff;
}

.product-page-hero p {
  font-size: 1.2rem;
  color: var(--clr-text-muted);
  max-width: 800px;
  margin: 0 auto;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 4rem 5%;
}

.spec-card {
  background: var(--clr-surface);
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s;
}

.spec-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 185, 66, 0.3);
}

.spec-card h3 {
  font-size: 1.5rem;
  color: var(--clr-accent);
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.spec-card ul {
  padding-left: 1rem;
  color: var(--clr-text-muted);
}

.spec-card li {
  margin-bottom: 0.5rem;
}

/* Rice Varieties — new card layout */
.rice-varieties-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.rice-variety-card {
  display: flex;
  gap: 3rem;
  align-items: stretch;
  border-radius: 24px;
  overflow: hidden;
  background: var(--clr-surface);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.rice-variety-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border-color: rgba(245, 185, 66, 0.25);
}

/* Even cards: image left  */
.card-even {
  flex-direction: row;
}

/* Odd cards: image right */
.card-odd {
  flex-direction: row-reverse;
}

.variety-img-wrap {
  flex: 0 0 50%;
  min-height: 320px;
  overflow: hidden;
}

.variety-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rice-variety-card:hover .variety-img {
  transform: scale(1.05);
}

.variety-spec-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2.5rem 2.5rem 2rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.variety-origin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 185, 66, 0.12);
  color: var(--clr-accent);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1rem;
  width: fit-content;
}

.variety-origin-badge ion-icon {
  font-size: 1rem;
  color: var(--clr-accent);
}

.variety-title {
  font-size: 1.9rem;
  color: var(--clr-accent);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.variety-desc {
  color: var(--clr-text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.variety-specs-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.variety-specs-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.97rem;
  color: var(--clr-text);
}

.variety-specs-list li ion-icon {
  flex-shrink: 0;
  margin-top: 3px;
}

/* variety-spec-card overrides conflicting spec-card base styles */
.variety-spec-card.spec-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 2.5rem 2.5rem 2.5rem 2rem;
}

.variety-spec-card.spec-card:hover {
  transform: none;
  border-color: transparent;
}

/* ---- Rice varieties: Mobile stack vertically ---- */
@media (max-width: 768px) {

  .rice-variety-card,
  .card-even,
  .card-odd {
    flex-direction: column !important;
  }

  /* Reveal wrapper inside card: stretch to fill */
  .rice-variety-card>.animate-hidden,
  .rice-variety-card>.animate-visible {
    width: 100%;
  }

  .variety-img-wrap {
    flex: none;
    width: 100%;
    min-height: 240px;
    max-height: 320px;
  }

  .variety-spec-card,
  .variety-spec-card.spec-card {
    padding: 1.8rem 1.5rem;
  }

  .variety-title {
    font-size: 1.5rem;
  }

  .rice-varieties-container {
    padding: 2rem 5%;
    gap: 2rem;
  }
}

/* ---- Maize / Sugar spec-grid: Mobile stack vertically (image always on top) ---- */
@media (max-width: 768px) {
  .spec-grid {
    display: flex;
    flex-direction: column;
    padding: 2rem 5%;
    gap: 1.5rem;
  }

  /* The Reveal wrapper that does NOT have spec-card class = image container → always first */
  .spec-grid>.animate-hidden:not(.spec-card),
  .spec-grid>.animate-visible:not(.spec-card) {
    order: -1;
  }

  /* Force image to fill width with a fixed height */
  .spec-grid>.animate-hidden:not(.spec-card) img,
  .spec-grid>.animate-visible:not(.spec-card) img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  }
}

/* legacy .rice-variant classes (kept for any old references) */
.rice-variant-img {
  width: 300px;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
}

.rice-variant-content {
  padding: 2rem;
  flex: 1;
}

.rice-variant-content h4 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.other-products-section {
  padding: 6rem 5% 8rem;
  background: var(--clr-bg);
  text-align: center;
}

.other-products-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.other-product-card {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  width: 200px;
}

.circle-img-container {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 3px solid transparent;
  transition: all 0.4s ease;
}

.circle-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.other-product-card:hover .circle-img-container {
  border-color: var(--clr-accent);
  transform: translateY(-10px);
}

.other-product-card:hover .circle-img-container img {
  transform: scale(1.1);
}

.circle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 185, 66, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.other-product-card:hover .circle-overlay {
  opacity: 1;
}

.circle-overlay ion-icon {
  font-size: 3rem;
  color: #fff;
}

.other-product-card h4 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--clr-text);
  transition: color 0.3s;
  margin-top: 1rem;
}

.other-product-card:hover h4 {
  color: var(--clr-accent);
}