/* ============================================
   广俊新材料 - 组件样式
   ============================================ */

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  background-color: var(--bg-slate-50);
  border-color: var(--border-medium);
}

.btn-dark {
  background-color: var(--bg-dark);
  color: #ffffff;
  border: 1px solid var(--bg-dark);
}

.btn-dark:hover {
  background-color: var(--bg-dark-light);
  border-color: var(--bg-dark-light);
  color: #ffffff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-full {
  width: 100%;
}

/* Button with Icon */
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-sm svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Cards
   ============================================ */

.card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

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

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-light);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-slate-50);
}

/* Card Variants */
.card-elevated {
  box-shadow: var(--shadow-md);
}

.card-elevated:hover {
  box-shadow: var(--shadow-lg);
}

.card-featured {
  border-color: var(--primary-border);
  box-shadow: 0 0 0 1px var(--primary-border), var(--shadow-md);
}

.card-dark {
  background-color: var(--bg-dark-light);
  border-color: var(--border-dark);
  color: #ffffff;
}

.card-dark .card-header,
.card-dark .card-footer {
  border-color: var(--border-dark);
}

/* ============================================
   Badges & Tags
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.badge-secondary {
  background-color: var(--bg-slate-100);
  color: var(--text-muted);
}

.badge-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.badge-dark {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ============================================
   Form Elements
   ============================================ */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-heading);
}

.form-label-required::after {
  content: " *";
  color: var(--primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  color: var(--text-heading);
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-subtle);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-hint {
  margin-top: var(--space-1);
  font-size: 13px;
  color: var(--text-muted);
}

.form-error {
  margin-top: var(--space-1);
  font-size: 13px;
  color: #dc2626;
}

/* ============================================
   Stats / Data Display
   ============================================ */

.stat-card {
  text-align: center;
  padding: var(--space-6);
}

.stat-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-unit {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ============================================
   Feature Items
   ============================================ */

.feature-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.feature-item:hover {
  background-color: var(--bg-slate-50);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-content h4 {
  margin-bottom: var(--space-1);
  font-size: 18px;
}

.feature-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   Timeline
   ============================================ */

.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border-light);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-8);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-8) + 5px);
  top: 4px;
  width: 14px;
  height: 14px;
  background-color: var(--primary);
  border: 3px solid var(--bg-white);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.timeline-year {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-1);
}

.timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-1);
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   Testimonial
   ============================================ */

.testimonial {
  padding: var(--space-8);
  background-color: var(--bg-slate-50);
  border-radius: var(--radius-lg);
}

.testimonial-quote {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: var(--space-6);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-info h5 {
  font-size: 16px;
  margin-bottom: 2px;
}

.testimonial-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   Section Header
   ============================================ */

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-8);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0;
}

.section-header-left {
  text-align: left;
  margin-left: 0;
}

/* ============================================
   Grid Layouts
   ============================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Image Containers
   ============================================ */

.img-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--bg-slate-100);
}

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

.img-container:hover img {
  transform: scale(1.03);
}

.img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.6), transparent);
}

/* ============================================
   Logo Grid
   ============================================ */

.logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-8) var(--space-12);
  opacity: 0.6;
}

.logo-grid img {
  height: 32px;
  width: auto;
  filter: grayscale(100%);
  transition: all var(--transition-base);
}

.logo-grid img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ============================================
   Alert / Notice
   ============================================ */

.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

/* ============================================
   Side Navigation (Full-screen sections)
   ============================================ */

.side-nav {
  position: fixed;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  z-index: calc(var(--z-sticky) - 1);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.side-nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-medium);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.side-nav-dot:hover {
  border-color: var(--primary);
  transform: scale(1.2);
}

.side-nav-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.15);
}

.side-nav-dot::before {
  content: attr(data-label);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.side-nav-dot:hover::before,
.side-nav-dot.active::before {
  opacity: 1;
  color: var(--primary);
}

@media (max-width: 1024px) {
  .side-nav { display: none; }
}
