/* ================================================
   H.G. HuaXing Concepts - Main Stylesheet
   ================================================ */

:root {
  /* Brand Colors */
  --primary-blue: #007FFF;
  --white: #FFFFFF;
  --light-grey: #F0F0F0;
  --dark-grey: #333333;
  --medium-grey: #666666;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-grey);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark-grey);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--medium-grey);
}

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

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ================================================
   Header / Navigation
   ================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: all var(--transition-medium);
}

.header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  max-width: 1200px;
  margin: 0 auto;
}

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

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

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-desktop a {
  font-weight: 500;
  position: relative;
  padding: var(--spacing-xs) 0;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: all var(--transition-medium);
  transform: translateX(-50%);
}

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

.nav-desktop a:hover {
  color: var(--primary-blue);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark-grey);
  transition: all var(--transition-medium);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: var(--white);
  z-index: 999;
  transition: right var(--transition-medium);
  display: flex;
  flex-direction: column;
  padding: var(--spacing-2xl) var(--spacing-md);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu ul {
  list-style: none;
  margin-top: var(--spacing-2xl);
}

.mobile-menu li {
  margin-bottom: var(--spacing-md);
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 500;
  display: block;
  padding: var(--spacing-sm) 0;
}

.mobile-menu .cta-btn {
  margin-top: var(--spacing-lg);
  display: inline-block;
}

.mobile-menu .contact-info {
  margin-top: auto;
  padding-top: var(--spacing-lg);
}

.mobile-menu .contact-info p {
  font-size: 0.9rem;
  margin-bottom: var(--spacing-xs);
}

.mobile-menu .contact-info a {
  font-size: 1rem;
}

.mobile-menu .social-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.mobile-menu .social-links a {
  font-size: 1rem;
  padding: var(--spacing-xs);
}

/* Primary CTA Button */
.cta-primary {
  display: inline-block;
  background: var(--primary-blue);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.cta-primary:hover {
  background: #0066cc;
  box-shadow: 0 4px 15px rgba(0, 127, 255, 0.4);
  transform: translateY(-2px);
}

/* Secondary CTA Button */
.cta-secondary {
  display: inline-block;
  background: transparent;
  color: var(--dark-grey);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  border: 2px solid var(--primary-blue);
  transition: all var(--transition-fast);
}

.cta-secondary:hover {
  background: var(--primary-blue);
  color: var(--white);
}

/* ================================================
   Hero Sections
   ================================================ */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
}

.hero-home {
  background-image: url('../images/hero_home.png');
}

.hero-about {
  background-image: url('../images/hero_about.png');
}

.hero-products {
  background-image: url('../images/hero_products.png');
}

.hero-product-detail {
  background-image: url('../images/product_hot_rolled.png');
  min-height: 50vh;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
}

/* Parallax Effect (Desktop Only) */
@media (min-width: 1024px) {
  .hero-home,
  .hero-about,
  .hero-products {
    background-attachment: fixed;
  }
}

/* ================================================
   About Section (Home)
   ================================================ */
.about-section {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.about-content h2 {
  margin-bottom: var(--spacing-md);
}

.about-image {
  display: none;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ================================================
   Products Section (Home)
   ================================================ */
.products-section {
  background: var(--light-grey);
}

.products-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.product-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-medium);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

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

.product-card-content {
  padding: var(--spacing-md);
}

.product-card h3 {
  margin-bottom: var(--spacing-xs);
  color: var(--dark-grey);
}

.product-card p {
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

.product-card .cta-link {
  color: var(--primary-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.product-card .cta-link:hover {
  color: #0066cc;
}

/* ================================================
   Why Choose Us Section
   ================================================ */
.why-choose-us {
  background: var(--white);
}

.why-choose-us h2 {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.feature-block {
  text-align: center;
  padding: var(--spacing-lg);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-grey);
  border-radius: 50%;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--primary-blue);
}

.feature-block h3 {
  margin-bottom: var(--spacing-sm);
}

.feature-block p {
  font-size: 0.95rem;
}

/* ================================================
   CTA Section
   ================================================ */
.cta-section {
  background: var(--primary-blue);
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-lg);
}

.cta-section .cta-primary {
  background: var(--white);
  color: var(--primary-blue);
}

.cta-section .cta-primary:hover {
  background: var(--light-grey);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* ================================================
   Footer
   ================================================ */
.footer {
  background: var(--dark-grey);
  color: var(--light-grey);
  padding: var(--spacing-2xl) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: var(--spacing-md);
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--spacing-xs);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--primary-blue);
}

.footer-contact p {
  margin-bottom: var(--spacing-xs);
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact a {
  color: var(--light-grey);
}

.footer-contact a:hover {
  color: var(--primary-blue);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.social-links a:hover {
  background: var(--primary-blue);
}

.footer-bottom {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.footer-bottom p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.footer-bottom .legal-links {
  display: flex;
  gap: var(--spacing-md);
}

.footer-bottom .legal-links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom .legal-links a:hover {
  color: var(--primary-blue);
}

/* ================================================
   About Page Specific Styles
   ================================================ */
.story-section {
  background: var(--white);
}

.story-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.story-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.values-section {
  background: var(--light-grey);
}

.values-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.value-card {
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.value-card .value-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-blue);
  border-radius: 50%;
}

.value-card .value-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--white);
}

.value-card h3 {
  margin-bottom: var(--spacing-sm);
}

/* ================================================
   Products Page Specific Styles
   ================================================ */
.products-page-section {
  background: var(--white);
}

.products-page-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.products-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.products-page-grid .product-card {
  display: flex;
  flex-direction: column;
}

.products-page-grid .product-card img {
  height: 240px;
}

/* ================================================
   Product Detail Page Specific Styles
   ================================================ */
.product-detail-hero {
  background: var(--light-grey);
  padding: var(--spacing-2xl) 0;
}

.product-detail-hero h1 {
  margin-bottom: var(--spacing-md);
}

.product-overview {
  background: var(--white);
}

.product-overview h2 {
  margin-bottom: var(--spacing-md);
}

.product-overview ul {
  list-style: none;
  margin-top: var(--spacing-md);
}

.product-overview li {
  padding: var(--spacing-xs) 0;
  padding-left: var(--spacing-lg);
  position: relative;
}

.product-overview li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: bold;
}

.specifications-section {
  background: var(--light-grey);
}

.specifications-section h2 {
  margin-bottom: var(--spacing-lg);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
}

.spec-table th,
.spec-table td {
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--light-grey);
}

.spec-table th {
  background: var(--primary-blue);
  color: var(--white);
  font-weight: 600;
}

.spec-table tr:hover {
  background: rgba(0, 127, 255, 0.05);
}

.applications-section {
  background: var(--white);
}

.applications-section h2 {
  margin-bottom: var(--spacing-lg);
}

.applications-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.application-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--light-grey);
  border-radius: 8px;
}

.application-item .app-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 50%;
  flex-shrink: 0;
}

.application-item h3 {
  font-size: 1rem;
  margin: 0;
}

.product-inquiry-section {
  background: var(--primary-blue);
  text-align: center;
}

.product-inquiry-section h2 {
  color: var(--white);
}

.product-inquiry-section p {
  color: rgba(255, 255, 255, 0.9);
}

/* ================================================
   Contact Page Specific Styles
   ================================================ */
.contact-hero {
  background: var(--light-grey);
  padding: var(--spacing-2xl) 0;
  text-align: center;
}

.contact-hero h1 {
  margin-bottom: var(--spacing-sm);
}

.contact-hero p {
  color: var(--medium-grey);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-section {
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

.contact-form-container h2 {
  margin-bottom: var(--spacing-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--dark-grey);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 127, 255, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.contact-form button[type="submit"] {
  align-self: flex-start;
  margin-top: var(--spacing-sm);
}

.form-success {
  display: none;
  padding: var(--spacing-md);
  background: #d4edda;
  color: #155724;
  border-radius: 6px;
  margin-bottom: var(--spacing-md);
}

.contact-details-container h2 {
  margin-bottom: var(--spacing-lg);
}

.contact-info-block {
  margin-bottom: var(--spacing-lg);
}

.contact-info-block h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--primary-blue);
}

.contact-info-block p {
  margin-bottom: var(--spacing-xs);
}

.contact-info-block a {
  color: var(--dark-grey);
}

.contact-info-block a:hover {
  color: var(--primary-blue);
}

.map-container {
  margin-top: var(--spacing-lg);
  border-radius: 8px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: none;
}

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

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

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 127, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 127, 255, 0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease forwards;
}

.cta-primary:hover {
  animation: pulse 1.5s infinite;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-home,
  .hero-about,
  .hero-products {
    background-attachment: scroll;
  }
}

/* ================================================
   Responsive - Tablet (640px - 1023px)
   ================================================ */
@media (min-width: 640px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  
  .hero {
    min-height: 70vh;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .about-image {
    display: block;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .products-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .applications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ================================================
   Responsive - Desktop (1024px+)
   ================================================ */
@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
  
  .header-inner {
    padding: var(--spacing-sm) var(--spacing-lg);
  }
  
  .logo img {
    height: 48px;
  }
  
  .menu-toggle {
    display: none;
  }
  
  .nav-desktop {
    display: block;
  }
  
  .mobile-menu {
    display: none;
  }
  
  .hero {
    min-height: 90vh;
    padding-top: 100px;
  }
  
  .hero h1 {
    font-size: 4rem;
  }
  
  .about-content {
    padding-right: var(--spacing-xl);
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .values-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .products-page-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .applications-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .contact-grid {
    grid-template-columns: 1.5fr 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--spacing-xl);
  }
  
  .footer-col {
    text-align: left;
  }
}

/* ================================================
   Mobile Header Adjustments
   ================================================ */
@media (max-width: 639px) {
  .logo img {
    height: 32px;
  }
  
  .hero {
    min-height: 60vh;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  .products-grid,
  .features-grid,
  .values-grid,
  .products-page-grid,
  .applications-grid {
    grid-template-columns: 1fr;
  }
}