
/* haisin_group_website/frontend/css/style.css */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --secondary-color: #64748b;
  --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --text-dark: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --gray-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: var(--background-gradient);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.header {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(5px);
}

.logo {
  transition: var(--transition);
}

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

.nav-item {
  position: relative;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-item:hover::after {
  width: 100%;
}

.language-switch {
  transition: var(--transition);
}

.language-switch:hover {
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
}

/* Product Cards */
.product-card {
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  border-radius: 0.5rem;
  overflow: hidden;
}

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

.product-image {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 0.5rem;
  transition: var(--transition);
}

.gallery-item:hover {
  transform: scale(1.03);
}

/* Form Styles */
.form-input {
  transition: var(--transition);
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.form-label {
  color: var(--text-dark);
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  transition: var(--transition);
}

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

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.slide-in {
  animation: slideIn 0.5s ease forwards;
}

/* Language Switch Animation */
.language-transition {
  transition: all 0.3s ease;
  transform-origin: center;
}

.language-transition:hover {
  transform: rotate(5deg) scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Particles Background */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Success Message */
.success-message {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  display: none;
}

.success-message.show {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

/* Tab Navigation */
.tab-nav {
  background-color: var(--gray-light);
  border-radius: 9999px;
  padding: 0.25rem;
}

.tab-button {
  transition: var(--transition);
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
}

.tab-button.active {
  background-color: var(--primary-color);
  color: white;
}

/* Contact Info Cards */
.contact-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

.contact-icon {
  background-color: #e0e7ff;
  color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
