/* 
 * Layout CSS file for CHIC CHIC CREATIVE TECHNOLOGY Website
 * Author: Development Team
 * Created: 2023
 * Description: Contains layout styles for the website
 */

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.header.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(255, 255, 255, 0.98);
}

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

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

.logo img {
  height: 50px;
  width: auto;
  transition: height 0.3s ease;
}

.header.scrolled .logo img {
  height: 40px;
}

.company-name {
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
}

.company-name .cn {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark-color);
}

.company-name .en {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Navigation */
.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: 2rem;
}

.nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-link:hover {
  color: var(--primary-color);
}

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

.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active:after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--dark-color);
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  background-color: var(--dark-color);
  overflow: hidden;
}

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

.hero-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: white;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 136, 229, 0.8), rgba(13, 71, 161, 0.9));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
}

/* Main Content Area */
.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px - 200px); /* Header height and footer height */
}

/* Footer */
.footer {
  background-color: var(--dark-color);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--primary-color);
}

.footer-menu {
  list-style: none;
}

.footer-menu li {
  margin-bottom: 0.75rem;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.footer-menu a:hover {
  color: white;
}

.contact-info p {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
}

.contact-info i {
  margin-right: 10px;
  color: var(--primary-color);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* About Section Image Fix */
.about-image {
  display: flex; /* Use flex to center the image */
  align-items: center;
  justify-content: center;
  height: 100%; /* Allow it to take full height of its grid cell */
}

.about-logo {
  max-width: 100%;
  max-height: 100%; /* Prevent image from exceeding container height */
  height: auto;      /* Maintain aspect ratio */
  width: auto;       /* Maintain aspect ratio, let max-width/max-height control size */
  object-fit: contain; /* Ensures the entire image is scaled down to fit, preserving aspect ratio */
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Responsive */
@media screen and (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .header-container {
    position: relative;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    width: 250px;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    border-radius: 0 0 4px 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
  }
  
  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .nav-item {
    margin: 0;
  }
  
  .nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
  }
  
  .nav-link:after {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2rem;
  }
}

@media screen and (max-width: 576px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .company-name {
    display: none;
  }
} 