/* ===================================
   海南雷沃生物科技 - 现代风格样式表
   Version: 2.0 (2026-06-09)
   =================================== */

/* --- CSS Variables --- */
:root {
  --primary: #2d5016;
  --primary-light: #3a6b1e;
  --accent: #d4a574;
  --accent-dark: #b88a5a;
  --text: #333;
  --text-light: #666;
  --bg-light: #f9f9f9;
  --bg-white: #ffffff;
  --shadow: 0 2px 15px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 8px;
  --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg-white);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* --- Header --- */
header {
  background: var(--bg-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text h1 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 2px;
}

.logo-text p {
  font-size: 12px;
  color: var(--text-light);
}

nav ul {
  display: flex;
  gap: 30px;
  align-items: center;
}

nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 0;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a:hover,
nav a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text);
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  height: 100vh;
  min-height: 600px;
  background: linear-gradient(135deg, #1a3d0c 0%, #2d5016 30%, #3a6b1e 50%, #2d5016 70%, #1a3d0c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding-top: 80px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(212,165,116,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  animation: fadeInUp 1s ease;
}

.hero h2 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.95;
}

.hero .btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(212,165,116,0.4);
}

.hero .btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,165,116,0.6);
}

/* --- Section Common --- */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.section-title p {
  color: var(--text-light);
  font-size: 16px;
  margin-top: 20px;
}

/* --- Features --- */
.features {
  background: var(--bg-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.feature-card .icon {
  font-size: 48px;
  margin-bottom: 20px;
  display: block;
}

.feature-card h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.8;
}

/* --- Products Preview --- */
.products-preview {
  background: var(--bg-white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card .info {
  padding: 20px;
}

.product-card h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 10px;
}

.product-card p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.product-card .btn-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

.product-card .btn-link:hover {
  color: var(--accent-dark);
}

/* --- Page Hero --- */
.page-hero {
  height: 300px;
  background: linear-gradient(135deg, #1a3d0c, #2d5016, #3a6b1e);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin-top: 80px;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(212,165,116,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.page-hero p {
  font-size: 16px;
  opacity: 0.9;
}

/* --- Product Detail --- */
.product-detail {
  background: var(--bg-white);
  padding: 60px 0;
}

.product-detail .content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 60px;
}

.product-detail .content:nth-child(even) {
  /* 偶数项：图片在右，文字在左 */
}

.product-detail .content:nth-child(even) .image {
  order: 2;
}

.product-detail .content:nth-child(even) .text {
  order: 1;
}

.product-detail .image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-detail .text h3 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 15px;
}

.product-detail .text .subtitle {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  display: block;
}

.product-detail .text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 15px;
}

.product-detail .text ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-light);
}

.product-detail .text ul li {
  margin-bottom: 8px;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.contact-info {
  background: var(--primary);
  color: white;
  padding: 40px;
  border-radius: var(--radius);
}

.contact-info h3 {
  font-size: 24px;
  margin-bottom: 30px;
}

.contact-info p {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-form {
  background: var(--bg-light);
  padding: 40px;
  border-radius: var(--radius);
}

.contact-form h3 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,165,116,0.2);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn-submit {
  background: var(--primary);
  color: white;
  padding: 14px 40px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* --- Footer --- */
footer {
  background: #1a1a1a;
  color: white;
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--accent);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #999;
  font-size: 14px;
}

.footer-col ul li a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #999;
  font-size: 14px;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- About Intro --- */
.about-intro .content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.about-intro .text h3 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 20px;
}
.about-intro .text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 15px;
}
.about-intro .image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- Timeline --- */
.timeline {
  background: var(--bg-light);
}
.timeline-item {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  position: relative;
  padding-left: 20px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: -40px;
  width: 3px;
  background: var(--accent);
}
.timeline-item:last-child::before {
  display: none;
}
.timeline-item .year {
  flex-shrink: 0;
  width: 80px;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}
.timeline-item .content h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 8px;
}
.timeline-item .content p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

/* --- Services Grid --- */
.services-grid .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.service-card {
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
.service-card .icon {
  font-size: 48px;
  display: block;
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 15px;
}
.service-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.8;
}

/* --- News Grid --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
}
.news-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.news-card .date {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
}
.news-card .info {
  padding: 25px;
}
.news-card h3 {
  font-size: 17px;
  color: var(--primary);
  margin-bottom: 12px;
  line-height: 1.5;
}
.news-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 15px;
}
.news-card .btn-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* --- Products Grid (products.html) --- */
.products-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* --- Product Filter Buttons --- */
.filter-btn {
  display: inline-block;
  padding: 10px 28px;
  margin: 5px;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
  }

  nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero h2 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .product-detail .content,
  .contact-grid,
  .about-intro .content {
    grid-template-columns: 1fr;
  }

  .product-detail .content:nth-child(even) .image,
  .product-detail .content:nth-child(even) .text {
    order: unset;
  }
}
