/* ===== LEGACY BROWSER FALLBACKS ===== */
/* IE11 and older browser compatibility */

/* ===== VARIABLES & RESET ===== */
:root {
  --green-900: #1b4332;
  --green-800: #2d6a4f;
  --green-700: #40916c;
  --green-600: #52b788;
  --green-100: #d8f3dc;
  --green-50:  #f0faf2;
  --earth-700: #6b4226;
  --earth-100: #f5e6d3;
  --gold:      #d4a017;
  --gray-900:  #1a1a2e;
  --gray-700:  #374151;
  --gray-500:  #6b7280;
  --gray-200:  #e5e7eb;
  --gray-100:  #f3f4f6;
  --white:     #ffffff;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--gray-700);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
}
#header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.08); }

.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.1rem; color: var(--green-800);
}
.nav-logo img { border-radius: 8px; }
.nav-logo strong { color: var(--green-700); }

.nav-menu {
  display: flex; gap: 8px;
}
.nav-menu a {
  padding: 8px 16px; border-radius: 8px;
  font-size: .95rem; font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition);
}
.nav-menu a:hover, .nav-menu a.active {
  background: var(--green-100); color: var(--green-800);
}

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative;
}
.nav-toggle span {
  display: block; width: 100%; height: 2.5px; background: var(--gray-700);
  border-radius: 2px; position: absolute; left: 0;
  transition: var(--transition);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(135deg, rgba(27,67,50,.88) 0%, rgba(45,106,79,.78) 50%, rgba(64,145,108,.65) 100%),
    url('data:image/svg+xml,<svg xmlns="https://static.vecteezy.com/system/resources/thumbnails/023/772/745/small_2x/black-and-green-wavy-shape-background-free-vector.jpg" viewBox="0 0 1440 320"><path fill="%232d6a4f" fill-opacity="0.1" d="M0,192L48,176C96,160,192,128,288,138.7C384,149,480,203,576,208C672,213,768,171,864,149.3C960,128,1056,128,1152,149.3C1248,171,1344,213,1392,234.7L1440,256L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') bottom/cover no-repeat;
  background-color: var(--green-800);
  text-align: center; color: var(--white);
  padding: 120px 24px 80px;
}

.hero-content { max-width: 740px; }

.hero h1 {
  font-family: 'Merriweather', serif;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.2; margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500; opacity: .92;
  margin-bottom: 12px;
}
.hero-text {
  font-size: 1.05rem; opacity: .8;
  margin-bottom: 32px; max-width: 560px; margin-left: auto; margin-right: auto;
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: 10px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); border: 2px solid transparent;
}
.btn-primary {
  background: var(--gold); color: var(--gray-900);
  border-color: var(--gold);
}
.btn-primary:hover { background: #c49315; border-color: #c49315; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline {
  background: transparent; color: var(--white);
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.15); border-color: var(--white); }
.btn-full { width: 100%; }

/* ===== SECTIONS ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--gray-100); }

.section-title {
  text-align: center; font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--green-900); margin-bottom: 8px;
}
.section-subtitle {
  text-align: center; color: var(--gray-500);
  font-size: 1.1rem; margin-bottom: 56px;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}
.about-card {
  background: var(--white); border-radius: var(--radius);
  padding: 40px 32px; box-shadow: var(--shadow);
  transition: var(--transition);
}
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.about-icon { font-size: 2.4rem; margin-bottom: 16px; }
.about-card h3 { font-size: 1.25rem; color: var(--green-800); margin-bottom: 12px; }

/* ===== PRODUCTS ===== */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.product-card {
  background: var(--white); border-radius: var(--radius);
  padding: 36px 28px; box-shadow: var(--shadow);
  border-top: 4px solid var(--green-600);
  transition: var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-emoji { font-size: 2.6rem; margin-bottom: 12px; }
.product-card h3 { font-size: 1.2rem; color: var(--green-800); margin-bottom: 10px; }
.product-card p { margin-bottom: 16px; font-size: .95rem; }
.product-card ul {
  padding-left: 0;
}
.product-card li {
  position: relative; padding-left: 20px; margin-bottom: 6px; font-size: .9rem; color: var(--gray-500);
}
.product-card li::before {
  content: '✓'; position: absolute; left: 0; color: var(--green-600); font-weight: 700;
}

/* ===== NEWS ===== */
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.news-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow);
  border-left: 4px solid var(--green-600);
  transition: var(--transition);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-badge {
  display: inline-block; padding: 4px 14px; border-radius: 20px;
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  background: var(--green-100); color: var(--green-800);
  margin-bottom: 14px;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-brown { background: var(--earth-100); color: var(--earth-700); }
.badge-red   { background: #fee2e2; color: #991b1b; }
.badge-blue  { background: #dbeafe; color: #1e40af; }

.news-card h3 { font-size: 1.1rem; color: var(--gray-900); margin-bottom: 8px; line-height: 1.4; }
.news-card time { display: block; font-size: .85rem; color: var(--gray-500); margin-bottom: 12px; }
.news-card p { font-size: .93rem; line-height: 1.65; }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.contact-item h4 { font-size: 1rem; color: var(--green-800); margin-bottom: 4px; }
.contact-item p { font-size: .95rem; }
.contact-item a { color: var(--green-700); font-weight: 500; }
.contact-item a:hover { text-decoration: underline; }

.contact-form {
  background: var(--white); border-radius: var(--radius);
  padding: 36px 32px; box-shadow: var(--shadow);
}
.contact-form h3 { font-size: 1.3rem; color: var(--green-800); margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: .9rem; font-weight: 600;
  color: var(--gray-700); margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: .95rem; font-family: var(--font);
  transition: var(--transition); background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(82,183,136,.2);
}
.form-success {
  margin-top: 16px; padding: 14px; border-radius: 8px;
  background: var(--green-100); color: var(--green-800);
  font-weight: 500; text-align: center;
}

/* ===== FOOTER ===== */
footer {
  background: var(--green-900); color: rgba(255,255,255,.7);
  padding: 40px 0;
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 600; }
.footer-brand img { border-radius: 6px; }
.footer-copy { font-size: .88rem; }
.footer-links { display: flex; gap: 20px; font-size: .88rem; }
.footer-links a:hover { color: var(--white); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; top: 72px; left: 0; right: 0;
    background: var(--white); flex-direction: column;
    padding: 16px 24px; gap: 4px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%); transition: var(--transition);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu a { padding: 12px 16px; }

  .contact-grid { grid-template-columns: 1fr; }
  .about-grid, .products-grid, .news-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .hero { padding: 100px 16px 60px; }
  .product-card, .news-card, .about-card, .contact-form { padding: 24px 20px; }
}

/* ===== NANOSCROLLER STYLES ===== */
.nano {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.nano > .nano-content {
  position: absolute;
  overflow: scroll;
  overflow-x: hidden;
  top: 0; right: 0; bottom: 0; left: 0;
}
.nano > .nano-pane {
  background: rgba(0,0,0,.15);
  position: absolute;
  width: 7px;
  right: 0; top: 0; bottom: 0;
  visibility: hidden\9;
  opacity: .01;
  -webkit-transition: .2s;
  -moz-transition: .2s;
  -o-transition: .2s;
  transition: .2s;
  border-radius: 5px;
}
.nano > .nano-pane > .nano-slider {
  background: rgba(0,0,0,.35);
  position: relative;
  border-radius: 3px;
}
.nano:hover > .nano-pane,
.nano-pane.active,
.nano-pane.flashed { visibility: visible\9; opacity: .99; }

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  -webkit-transform: translateY(24px);
  -ms-transform: translateY(24px);
  transform: translateY(24px);
  -webkit-transition: opacity .6s ease, -webkit-transform .6s ease;
  -moz-transition: opacity .6s ease, -moz-transform .6s ease;
  -o-transition: opacity .6s ease, -o-transform .6s ease;
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  -webkit-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
}

/* ===== LEGACY BROWSER FALLBACKS ===== */
/* Fallback colors for browsers without CSS custom properties */
#header {
  background: rgba(255,255,255,.92); /* fallback */
}
.hero {
  background-color: #2d6a4f; /* fallback */
}
.btn-primary {
  background: #d4a017; /* fallback */
  color: #1a1a2e; /* fallback */
}
.section-title {
  color: #1b4332; /* fallback */
}
.about-card h3,
.product-card h3,
.contact-form h3,
.contact-item h4,
.nav-logo {
  color: #2d6a4f; /* fallback */
}

/* Print styles for SEO */
@media print {
  .hero { min-height: auto; padding: 40px 20px; }
  .nav-toggle, .hero-overlay { display: none; }
  #header { position: static; }
  .section { padding: 30px 0; }
  .about-grid, .products-grid, .news-grid { display: block; }
  .about-card, .product-card, .news-card { page-break-inside: avoid; margin-bottom: 20px; }
  a[href]::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    -webkit-animation-duration: .01ms !important;
    animation-duration: .01ms !important;
    -webkit-transition-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1; -webkit-transform: none; -ms-transform: none; transform: none; }
}
