@charset "utf-8";
/* ==========================================================================
   modern.css - 2026 Modern UI Framework for Taishan Banli
   Company: Tai'an Liguan Food Co., Ltd.
   Style: Preserve original green (#07913b) + red (#b81d21) theme
   Encoding: UTF-8
   ========================================================================== */

/* ========== CSS Variables ========== */
:root {
  /* Brand Colors - Preserved from original */
  --brand-green: #07913b;
  --brand-green-dark: #055f27;
  --brand-green-light: #46af33;
  --brand-red: #b81d21;
  --brand-red-dark: #93002c;
  --brand-gold: #d5b270;

  /* Neutral Colors */
  --c-text: #2a2a2a;
  --c-text-light: #666;
  --c-text-muted: #999;
  --c-bg: #ffffff;
  --c-bg-alt: #f8f9fa;
  --c-bg-dark: #1a1a2e;
  --c-border: #e8e8e8;
  --c-border-light: #f0f0f0;
  --c-shadow: rgba(0, 0, 0, 0.08);
  --c-shadow-hover: rgba(0, 0, 0, 0.15);

  /* Gradients */
  --grad-green: linear-gradient(135deg, #07913b 0%, #46af33 100%);
  --grad-red: linear-gradient(135deg, #b81d21 0%, #d6363a 100%);
  --grad-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);

  /* Typography */
  --font-main: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-lg: 18px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-3xl: 40px;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 40px;
  --sp-2xl: 60px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-green: 0 4px 20px rgba(7, 145, 59, 0.15);
  --shadow-red: 0 4px 20px rgba(184, 29, 33, 0.15);

  /* Transitions */
  --tr-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --max-width: 1200px;
  --sidebar-width: 220px;
  --header-height: 130px;
}

/* ========== Modern Reset (Additive) ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: var(--fs-base);
  color: var(--c-text);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-green);
  transition: color var(--tr-fast);
}

a:hover {
  color: var(--brand-green-dark);
}

/* ========== Utility Classes ========== */
.modern-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.modern-section {
  padding: var(--sp-2xl) 0;
}

.modern-text-center { text-align: center; }
.modern-text-left { text-align: left; }
.modern-text-right { text-align: right; }
.modern-hidden { display: none !important; }
.modern-mt-sm { margin-top: var(--sp-sm); }
.modern-mt-md { margin-top: var(--sp-md); }
.modern-mt-lg { margin-top: var(--sp-lg); }

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* Scroll-triggered animation classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.animate-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-right.animated {
  opacity: 1;
  transform: translateX(0);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale.animated {
  opacity: 1;
  transform: scale(1);
}

/* ========== Modern Header / Navigation ========== */
.modern-header {
  position: relative;
  width: 100%;
  z-index: 1000;
}

.modern-header-top {
  background: var(--grad-green);
  color: #fff;
  padding: 8px 0;
  font-size: var(--fs-sm);
}

.modern-header-top .modern-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-header-top a {
  color: #fff;
  opacity: 0.9;
}

.modern-header-top a:hover {
  opacity: 1;
}

.modern-nav {
  background: #fff;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: box-shadow var(--tr-base);
}

.modern-nav.scrolled {
  box-shadow: var(--shadow-lg);
}

.modern-nav .modern-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.modern-logo img {
  max-height: 60px;
  width: auto;
  transition: transform var(--tr-base);
}

.modern-logo:hover img {
  transform: scale(1.05);
}

.modern-nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.modern-nav-list > li > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  color: var(--c-text);
  font-size: var(--fs-base);
  font-weight: 500;
  position: relative;
  transition: all var(--tr-fast);
}

.modern-nav-list > li > a span {
  font-size: var(--fs-base);
  font-weight: 600;
}

.modern-nav-list > li > a i {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  font-style: normal;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modern-nav-list > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--grad-green);
  border-radius: 3px 3px 0 0;
  transition: all var(--tr-base);
  transform: translateX(-50%);
}

.modern-nav-list > li > a:hover::after,
.modern-nav-list > li.active > a::after {
  width: 70%;
}

.modern-nav-list > li > a:hover span,
.modern-nav-list > li.active > a span {
  color: var(--brand-green);
}

.modern-nav-list > li > a:hover i,
.modern-nav-list > li.active > a i {
  color: var(--brand-green-light);
}

/* Mobile Hamburger Button */
.modern-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.modern-hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--brand-green);
  border-radius: 3px;
  transition: all var(--tr-base);
}

.modern-hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.modern-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.modern-hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.modern-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 350px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 30px rgba(0,0,0,0.15);
  z-index: 999;
  overflow-y: auto;
  transition: right var(--tr-base);
  padding-top: 80px;
}

.modern-mobile-menu.open {
  right: 0;
}

.modern-mobile-menu .mobile-nav-list {
  list-style: none;
  padding: 0;
}

.modern-mobile-menu .mobile-nav-list > li {
  border-bottom: 1px solid var(--c-border-light);
}

.modern-mobile-menu .mobile-nav-list > li > a {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  color: var(--c-text);
  font-size: var(--fs-lg);
  font-weight: 500;
  transition: all var(--tr-fast);
}

.modern-mobile-menu .mobile-nav-list > li > a:hover,
.modern-mobile-menu .mobile-nav-list > li.active > a {
  background: var(--c-bg-alt);
  color: var(--brand-green);
  padding-left: 30px;
}

.modern-mobile-menu .mobile-contact {
  padding: 24px;
  border-top: 1px solid var(--c-border);
  margin-top: 20px;
}

.modern-mobile-menu .mobile-contact p {
  margin: 8px 0;
  font-size: var(--fs-sm);
  color: var(--c-text-light);
}

.modern-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--tr-base);
}

.modern-menu-overlay.show {
  display: block;
  opacity: 1;
}

/* ========== Modern Banner ========== */
.modern-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.modern-banner .slideBox {
  position: relative;
}

.modern-banner .bd ul li {
  position: relative;
  overflow: hidden;
}

.modern-banner .bd ul li img {
  width: 100%;
  display: block;
  transition: transform var(--tr-slow);
}

.modern-banner .bd ul li:hover img {
  transform: scale(1.03);
}

.modern-banner .xc-banner-index-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--grad-overlay);
  padding: 40px 0;
  z-index: 2;
}

.modern-banner .xc-banner-index-text p {
  color: #fff;
  font-size: var(--fs-xl);
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.modern-banner .xd {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  z-index: 3;
}

.modern-banner .xd .w {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-banner .xd span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.modern-banner .xd span:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.1);
}

.modern-banner .xd span img {
  width: 20px;
  height: auto;
}

/* ========== Modern Section Title ========== */
.modern-section-title {
  text-align: center;
  margin-bottom: var(--sp-xl);
  position: relative;
}

.modern-section-title h2 {
  font-size: var(--fs-2xl);
  color: var(--c-text);
  font-weight: 700;
  margin-bottom: var(--sp-sm);
  position: relative;
  display: inline-block;
}

.modern-section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--grad-green);
  border-radius: 2px;
  margin: var(--sp-sm) auto 0;
}

.modern-section-title p {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* ========== Modern Product Cards ========== */
.modern-product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--tr-base);
  position: relative;
}

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

.modern-product-card .card-img {
  overflow: hidden;
  position: relative;
}

.modern-product-card .card-img img {
  width: 100%;
  display: block;
  transition: transform var(--tr-slow);
}

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

.modern-product-card .card-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 145, 59, 0);
  transition: background var(--tr-base);
}

.modern-product-card:hover .card-img::after {
  background: rgba(7, 145, 59, 0.1);
}

.modern-product-card .card-body {
  padding: var(--sp-md);
  text-align: center;
}

.modern-product-card .card-body h4 {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}

.modern-product-card .card-body h4 a {
  color: inherit;
  text-decoration: none;
  transition: color var(--tr-fast);
}

.modern-product-card .card-body h4 a:hover {
  color: var(--brand-green);
}

/* ========== Modern Tab System ========== */
.modern-tabs {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
  flex-wrap: wrap;
}

.modern-tabs .TabTitle ul {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.modern-tabs .TabTitle ul li {
  padding: 10px 24px;
  background: var(--c-bg-alt);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--tr-fast);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--c-text-light);
  border: 2px solid transparent;
}

.modern-tabs .TabTitle ul li:hover {
  background: #e8f5e9;
  color: var(--brand-green);
}

.modern-tabs .TabTitle ul li.active {
  background: var(--grad-green);
  color: #fff;
  box-shadow: var(--shadow-green);
}

.modern-tabs .TabTitle ul li a {
  color: inherit;
  text-decoration: none;
}

/* ========== Modern About Section ========== */
.modern-about {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  flex-wrap: wrap;
}

.modern-about .about-image {
  flex: 0 0 40%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modern-about .about-image img {
  width: 100%;
  display: block;
  transition: transform var(--tr-slow);
}

.modern-about .about-image:hover img {
  transform: scale(1.05);
}

.modern-about .about-text {
  flex: 1;
  min-width: 300px;
}

.modern-about .about-text h3 {
  font-size: var(--fs-xl);
  color: var(--c-text);
  font-weight: 700;
  margin-bottom: var(--sp-md);
}

.modern-about .about-text p {
  color: var(--c-text-light);
  line-height: 1.8;
  margin-bottom: var(--sp-md);
}

.modern-about .about-text .read-more {
  display: inline-block;
  padding: 10px 30px;
  background: var(--grad-green);
  color: #fff;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--tr-fast);
  box-shadow: var(--shadow-green);
}

.modern-about .about-text .read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(7, 145, 59, 0.3);
}

/* ========== Modern News Section ========== */
.modern-news-card {
  display: flex;
  gap: var(--sp-md);
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--tr-base);
  margin-bottom: var(--sp-md);
}

.modern-news-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.modern-news-card .news-img {
  flex: 0 0 40%;
  overflow: hidden;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.modern-news-card .news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

.modern-news-card:hover .news-img img {
  transform: scale(1.1);
}

.modern-news-card .news-body {
  flex: 1;
  padding: var(--sp-md);
}

.modern-news-card .news-body h4 {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.modern-news-card .news-body h4 a {
  color: var(--c-text);
  text-decoration: none;
  transition: color var(--tr-fast);
}

.modern-news-card .news-body h4 a:hover {
  color: var(--brand-green);
}

.modern-news-card .news-body .news-date {
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-sm);
}

.modern-news-card .news-body p {
  color: var(--c-text-light);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* ========== Modern Footer ========== */
.modern-footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ccc;
  padding: var(--sp-2xl) 0 var(--sp-lg);
  margin-top: var(--sp-2xl);
}

.modern-footer .footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-md);
  align-items: flex-start;
}

.modern-footer .footer-logo {
  flex: 0 0 200px;
}

.modern-footer .footer-logo img {
  max-width: 100%;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modern-footer .footer-info {
  flex: 1;
  min-width: 300px;
}

.modern-footer .footer-info p {
  margin: 6px 0;
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: #aaa;
}

.modern-footer .footer-info a {
  color: #aaa;
  text-decoration: none;
  transition: color var(--tr-fast);
}

.modern-footer .footer-info a:hover {
  color: var(--brand-green-light);
}

.modern-footer .footer-bottom {
  text-align: center;
  padding-top: var(--sp-lg);
  margin-top: var(--sp-lg);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: var(--fs-xs);
  color: #888;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ========== Modern Sidebar ========== */
.modern-sidebar {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--sp-lg);
}

.modern-sidebar .sidebar-title {
  background: var(--grad-green);
  color: #fff;
  padding: 16px 20px;
  font-size: var(--fs-lg);
  font-weight: 600;
  display: block;
  text-decoration: none;
}

.modern-sidebar .sidebar-title:hover {
  opacity: 0.95;
}

.modern-sidebar .sidebar-list {
  list-style: none;
  padding: 0;
}

.modern-sidebar .sidebar-list li {
  border-bottom: 1px solid var(--c-border-light);
  transition: background var(--tr-fast);
}

.modern-sidebar .sidebar-list li:last-child {
  border-bottom: none;
}

.modern-sidebar .sidebar-list li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--c-text);
  text-decoration: none;
  transition: all var(--tr-fast);
  position: relative;
}

.modern-sidebar .sidebar-list li a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--brand-green);
  border-radius: 50%;
  margin-right: 12px;
  transition: transform var(--tr-fast);
}

.modern-sidebar .sidebar-list li a:hover {
  background: #f0f7f0;
  color: var(--brand-green);
  padding-left: 25px;
}

.modern-sidebar .sidebar-list li a:hover::before {
  transform: scale(1.5);
}

.modern-sidebar .sidebar-contact {
  padding: 20px;
}

.modern-sidebar .sidebar-contact .content {
  font-size: var(--fs-sm);
  color: var(--c-text-light);
  line-height: 1.8;
}

/* ========== Modern Content Area ========== */
.modern-content-area {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.modern-breadcrumb {
  padding: 16px 24px;
  border-bottom: 1px solid var(--c-border-light);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.modern-breadcrumb a {
  color: var(--brand-green);
  text-decoration: none;
}

.modern-breadcrumb a:hover {
  text-decoration: underline;
}

.modern-content-body {
  padding: var(--sp-lg);
}

.modern-content-body h1 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-md);
  text-align: center;
}

.modern-content-body h2 {
  font-size: var(--fs-xl);
  font-weight: 600;
  margin: var(--sp-lg) 0 var(--sp-md);
}

.modern-content-body p {
  line-height: 1.8;
  margin-bottom: var(--sp-md);
  color: var(--c-text);
}

.modern-content-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--sp-md) 0;
}

.modern-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-md) 0;
}

.modern-content-body table td {
  padding: 10px;
  border: 1px solid var(--c-border);
}

/* ========== Modern News Detail ========== */
.modern-news-detail {
  padding: var(--sp-lg);
}

.modern-news-detail .news-title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--sp-md);
  color: var(--c-text);
}

.modern-news-detail .news-meta {
  display: flex;
  justify-content: center;
  gap: var(--sp-lg);
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--c-border-light);
  border-bottom: 1px solid var(--c-border-light);
  margin-bottom: var(--sp-lg);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.modern-news-detail .news-content {
  line-height: 1.8;
}

.modern-news-detail .news-content img {
  display: block;
  margin: var(--sp-md) auto;
  max-width: 100%;
  border-radius: var(--radius-md);
}

.modern-news-detail .news-nav {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--c-border-light);
  margin-top: var(--sp-lg);
}

.modern-news-detail .news-nav a {
  color: var(--brand-green);
  text-decoration: none;
  font-size: var(--fs-sm);
}

.modern-news-detail .news-nav a:hover {
  text-decoration: underline;
}

/* ========== Modern Product List ========== */
.modern-product-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  padding: var(--sp-lg);
}

.modern-product-list li {
  list-style: none;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--tr-base);
}

.modern-product-list li:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.modern-product-list li a.img {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modern-product-list li a.img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

.modern-product-list li:hover a.img img {
  transform: scale(1.1);
}

.modern-product-list li h3 {
  padding: 12px;
  text-align: center;
  font-size: var(--fs-base);
}

.modern-product-list li h3 a {
  color: var(--c-text);
  text-decoration: none;
  transition: color var(--tr-fast);
}

.modern-product-list li:hover h3 a {
  color: var(--brand-green);
}

/* ========== Modern News List ========== */
.modern-news-list {
  list-style: none;
  padding: var(--sp-lg);
}

.modern-news-list li {
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--c-border-light);
}

.modern-news-list li h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.modern-news-list li h3 a {
  color: var(--c-text);
  text-decoration: none;
  transition: color var(--tr-fast);
}

.modern-news-list li h3 a:hover {
  color: var(--brand-green);
}

.modern-news-list li div {
  color: var(--c-text-light);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin-bottom: var(--sp-sm);
}

.modern-news-list li span {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

/* ========== Modern Form ========== */
.modern-form {
  padding: var(--sp-xl);
  max-width: 700px;
  margin: 0 auto;
}

.modern-form .form-group {
  margin-bottom: var(--sp-md);
}

.modern-form label {
  display: block;
  margin-bottom: var(--sp-sm);
  font-weight: 600;
  color: var(--c-text);
}

.modern-form label b {
  color: var(--brand-red);
  margin-right: 4px;
}

.modern-form .form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  color: var(--c-text);
  transition: all var(--tr-fast);
  background: #fff;
  box-sizing: border-box;
  font-family: var(--font-main);
}

.modern-form .form-control:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(7, 145, 59, 0.1);
  outline: none;
}

.modern-form textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.modern-form .form-buttons {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  margin-top: var(--sp-lg);
}

.modern-form .btn-submit {
  padding: 12px 40px;
  background: var(--grad-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr-fast);
  box-shadow: var(--shadow-green);
  font-family: var(--font-main);
}

.modern-form .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(7, 145, 59, 0.3);
}

.modern-form .btn-reset {
  padding: 12px 40px;
  background: var(--c-bg-alt);
  color: var(--c-text-light);
  border: 2px solid var(--c-border);
  border-radius: var(--radius-full);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr-fast);
  font-family: var(--font-main);
}

.modern-form .btn-reset:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

/* ========== Modern Pagination ========== */
.modern-pagination {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-lg) 0;
}

.modern-pagination a,
.modern-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--c-text-light);
  text-decoration: none;
  transition: all var(--tr-fast);
  cursor: pointer;
}

.modern-pagination a:hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
  background: #f0f7f0;
}

.modern-pagination .current {
  background: var(--grad-green);
  color: #fff;
  border-color: transparent;
}

/* ========== Back to Top Button ========== */
.modern-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--grad-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-green);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--tr-base);
  border: none;
}

.modern-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.modern-back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 25px rgba(7, 145, 59, 0.3);
}

.modern-back-to-top::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: rotate(45deg);
  margin-top: 4px;
}

/* ========== Modern Contact Bar (Floating) ========== */
.modern-contact-bar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 997;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.modern-contact-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(7, 145, 59, 0.9);
  color: #fff;
  text-decoration: none;
  transition: all var(--tr-fast);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modern-contact-bar a:hover {
  width: 60px;
  background: var(--brand-green);
}

.modern-contact-bar a svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* ========== Modern Search Box ========== */
.modern-search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: border-color var(--tr-fast);
}

.modern-search-box:focus-within {
  border-color: var(--brand-green);
}

.modern-search-box input {
  border: none;
  outline: none;
  padding: 8px 16px;
  font-size: var(--fs-sm);
  flex: 1;
  background: transparent;
}

.modern-search-box button {
  background: var(--grad-green);
  border: none;
  color: #fff;
  padding: 8px 16px;
  cursor: pointer;
  font-size: var(--fs-sm);
  transition: opacity var(--tr-fast);
}

.modern-search-box button:hover {
  opacity: 0.9;
}

/* ========== Responsive Design ========== */

/* Tablet */
@media screen and (max-width: 1024px) {
  :root {
    --fs-2xl: 28px;
    --fs-3xl: 36px;
    --sp-2xl: 40px;
  }

  .modern-nav-list {
    gap: 0;
  }

  .modern-nav-list > li > a {
    padding: 10px 12px;
    font-size: var(--fs-sm);
  }

  .modern-nav-list > li > a span {
    font-size: var(--fs-sm);
  }

  .modern-product-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media screen and (max-width: 768px) {
  :root {
    --fs-2xl: 24px;
    --fs-3xl: 30px;
    --fs-xl: 20px;
    --fs-lg: 16px;
    --sp-2xl: 30px;
    --sp-xl: 24px;
  }

  body {
    font-size: var(--fs-sm);
    min-width: auto !important;
  }

  .mW {
    min-width: auto !important;
  }

  /* Hide desktop nav, show hamburger */
  .modern-nav-list {
    display: none;
  }

  .modern-hamburger {
    display: flex;
  }

  .modern-mobile-menu {
    display: block;
  }

  .modern-nav .modern-container {
    height: 60px;
    padding: 0 16px;
  }

  .modern-logo img {
    max-height: 45px;
  }

  /* Banner */
  .modern-banner .xd span {
    width: 40px;
    height: 40px;
  }

  .modern-banner .xd span img {
    width: 16px;
  }

  .modern-banner .xc-banner-index-text p {
    font-size: var(--fs-base);
  }

  /* Section spacing */
  .modern-section {
    padding: var(--sp-xl) 0;
  }

  /* About section */
  .modern-about {
    flex-direction: column;
    gap: var(--sp-md);
  }

  .modern-about .about-image {
    flex: 1 1 100%;
    width: 100%;
  }

  /* Product grid */
  .modern-product-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-sm);
    padding: var(--sp-md);
  }

  .modern-product-list li a.img img {
    height: 130px;
  }

  /* News cards */
  .modern-news-card {
    flex-direction: column;
  }

  .modern-news-card .news-img {
    flex: 1 1 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .modern-news-card .news-img img {
    height: 180px;
  }

  /* Footer */
  .modern-footer .footer-content {
    flex-direction: column;
    gap: var(--sp-md);
  }

  .modern-footer .footer-logo {
    flex: 1 1 100%;
    max-width: 200px;
  }

  /* Content layout: sidebar + content becomes stacked */
  #container.clearfix {
    display: flex;
    flex-direction: column;
    padding: var(--sp-md);
    max-width: 100%;
  }

  #container .left {
    order: 2;
    width: 100% !important;
    margin-bottom: var(--sp-md);
  }

  #container .right {
    order: 1;
    width: 100% !important;
  }

  /* Content area */
  .modern-content-body {
    padding: var(--sp-md);
  }

  /* Forms */
  .modern-form {
    padding: var(--sp-md);
  }

  .modern-form .form-buttons {
    flex-direction: column;
  }

  /* Tabs */
  .modern-tabs .TabTitle ul li {
    padding: 8px 16px;
    font-size: var(--fs-sm);
  }

  /* Product card scroll on mobile */
  .picScroll .tempWrap {
    width: 100% !important;
  }

  .picScroll .picList {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-sm);
  }

  .picScroll .picList li {
    width: 45% !important;
  }

  /* Contact bar hidden on mobile */
  .modern-contact-bar {
    display: none;
  }

  /* Back to top */
  .modern-back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }

  /* Tab content product lists */
  .lvjdList {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    justify-content: center;
  }

  .lvjdList dd {
    width: 45% !important;
  }

  .lvjdList dd .lvjdPic img {
    width: 100%;
    height: auto;
  }

  /* Marquee width fix */
  [id^="Marquee_"] {
    width: 100% !important;
  }

  /* Table fixes */
  .modern-content-body table {
    display: block;
    overflow-x: auto;
  }

  /* xc-video and xc-lesson sections */
  .xc-lesson,
  .xc-video,
  .xc-product,
  .xc-ask {
    height: auto !important;
    min-height: auto !important;
  }

  .xc-pro {
    position: static !important;
  }

  /* Row layouts */
  .row-02,
  .row-03 {
    padding: var(--sp-md) 0;
  }

  /* Index title */
  .indexTitle .divTop span {
    font-size: var(--fs-lg) !important;
  }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
  :root {
    --fs-xl: 18px;
    --fs-2xl: 20px;
  }

  .modern-product-list {
    grid-template-columns: 1fr;
  }

  .picScroll .picList li,
  .lvjdList dd {
    width: 100% !important;
  }

  .modern-container {
    padding: 0 12px;
  }

  .modern-form .form-control {
    font-size: var(--fs-sm);
  }

  .modern-tabs .TabTitle ul li {
    padding: 6px 12px;
    font-size: var(--fs-xs);
  }
}

/* Print */
@media print {
  .modern-nav,
  .modern-hamburger,
  .modern-mobile-menu,
  .modern-back-to-top,
  .modern-contact-bar,
  .modern-banner .xd {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}

/* ========== Admin Modern Styles ========== */
.admin-modern-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  padding: 20px;
}

.admin-modern-login .login-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
  max-width: 420px;
  width: 100%;
}

.admin-modern-login .login-header {
  text-align: center;
  margin-bottom: 30px;
}

.admin-modern-login .login-header h1 {
  font-size: 24px;
  color: #2c5364;
  font-weight: 700;
  margin-bottom: 8px;
}

.admin-modern-login .login-header p {
  color: #888;
  font-size: 14px;
}

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

.admin-modern-login .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
  font-weight: 500;
}

.admin-modern-login .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}

.admin-modern-login .form-group input:focus {
  border-color: #2c5364;
  box-shadow: 0 0 0 3px rgba(44, 83, 100, 0.1);
}

.admin-modern-login .login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2c5364 0%, #0f2027 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.admin-modern-login .login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 83, 100, 0.3);
}

.admin-modern-login .login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #aaa;
}

/* Admin Dashboard Modern */
.admin-modern-frame {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f0f2f5;
}

.admin-modern-sidebar {
  width: 220px;
  background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
  color: #fff;
  overflow-y: auto;
  flex-shrink: 0;
  transition: width 0.3s ease;
}

.admin-modern-sidebar .sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-modern-sidebar .sidebar-header h3 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
}

.admin-modern-sidebar .sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-modern-sidebar .sidebar-menu > li {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-modern-sidebar .sidebar-menu > li > a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.admin-modern-sidebar .sidebar-menu > li > a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding-left: 25px;
}

.admin-modern-sidebar .sidebar-menu .submenu {
  list-style: none;
  padding: 0;
  background: rgba(0,0,0,0.2);
}

.admin-modern-sidebar .sidebar-menu .submenu li a {
  padding: 10px 20px 10px 40px;
  font-size: 13px;
}

.admin-modern-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-modern-topbar {
  height: 60px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.admin-modern-topbar .topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.admin-modern-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.admin-modern-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 24px;
  margin-bottom: 20px;
}

.admin-modern-card .card-header {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.admin-modern-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-modern-table th {
  background: #f5f7fa;
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #e8e8e8;
}

.admin-modern-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #666;
  border-bottom: 1px solid #f0f0f0;
}

.admin-modern-table tr:hover td {
  background: #fafbfc;
}

.admin-modern-btn {
  display: inline-block;
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.admin-modern-btn-primary {
  background: #2a5298;
  color: #fff;
}

.admin-modern-btn-primary:hover {
  background: #1e3c72;
}

.admin-modern-btn-danger {
  background: #e74c3c;
  color: #fff;
}

.admin-modern-btn-danger:hover {
  background: #c0392b;
}

.admin-modern-btn-success {
  background: #27ae60;
  color: #fff;
}

.admin-modern-btn-success:hover {
  background: #229954;
}

/* Admin responsive */
@media screen and (max-width: 768px) {
  .admin-modern-sidebar {
    width: 60px;
  }

  .admin-modern-sidebar .sidebar-header h3,
  .admin-modern-sidebar .sidebar-menu > li > a span {
    display: none;
  }

  .admin-modern-sidebar .sidebar-menu .submenu {
    display: none;
  }

  .admin-modern-content {
    padding: 16px;
  }

  .admin-modern-table {
    font-size: 12px;
  }

  .admin-modern-table th,
  .admin-modern-table td {
    padding: 8px;
  }
}
