@import url('common.css');

header {
    background-color: var(--primary-color);
    color: white;
    padding: 0;
    box-shadow: 0 3px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--body-font);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: var(--font-size-xxl);
    font-weight: 600;
    color: white;
    text-decoration: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    padding: 10px 0;
    line-height: 1.2;
}

.logo-full {
    display: block;
}

.logo-short {
    display: none;
}

.logo img {
    height: 45px;
    margin-right: 12px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

.nav-links li {
    margin-left: 2rem;
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: 500;
    padding: 0.6rem 0;
    display: block;
    position: relative;
    transition: all 0.3s;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 1);
}

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

/* Active navigation item */
.nav-links li.active a:after {
    width: 100%;
}

/* 主内容区 */
main {
    padding: 1.8rem 0;
    min-height: calc(100vh - 140px);
}

/* 页脚 */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2.5rem 0;
    box-shadow: 0 -2px 10px var(--shadow-color);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 新的footer样式 */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-menu, .footer-contact, .footer-quick-links {
    flex: 1;
    min-width: 200px;
}

.footer-menu h3, .footer-contact h3, .footer-quick-links h3 {
    font-size: var(--font-size-medium);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.footer-menu h3:after, .footer-contact h3:after, .footer-quick-links h3:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    bottom: -5px;
    left: 0;
    border-radius: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-contact p {
    margin-bottom: 0.8rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.footer-contact i {
    margin-right: 0.5rem;
}

.footer-copyright-bar {
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.footer-copyright-bar p {
    font-size: var(--font-size-small);
    opacity: 0.9;
}

/* 响应式footer样式 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-menu, .footer-contact, .footer-quick-links {
        width: 100%;
        text-align: center;
    }
    
    .footer-menu h3:after, .footer-contact h3:after, .footer-quick-links h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-copyright-bar {
        text-align: center;
        margin-top: 1rem;
    }
    
    .footer-links a:hover {
        transform: none;
    }
}

/* Menu toggle button styling */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    nav {
        padding: 0 20px;
        height: 60px;
    }
    
    .logo {
        font-size: var(--font-size-large);
        max-width: 65%;
        line-height: 1.3;
        padding: 5px 0;
    }
    
    .logo-full {
        display: none;
    }
    
    .logo-short {
        display: block;
        font-weight: 700;
    }
    
    .menu-toggle {
        display: flex;
        margin-left: auto;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 70px 25px 25px;
        z-index: 5;
        box-shadow: -5px 0 15px var(--shadow-color);
        transition: right 0.3s ease;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 0 0 1.2rem;
        width: 100%;
    }
    
    .nav-links a {
        font-size: var(--font-size-large);
        padding: 0.6rem 0;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a:after {
        display: none;
    }
    
    /* 汉堡菜单动画 */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* 移动端搜索框调整 */
    .nav-search {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 8px 16px;
        background-color: var(--primary-color-dark);
        opacity: 0.95;
        margin-left: 0;
        z-index: 4;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .nav-search.active {
        display: flex;
    }
    
    .nav-search input {
        width: 100%;
        padding: 8px 14px;
        font-size: var(--font-size-small);
    }
    
    .nav-search input:focus {
        width: 100%;
    }
    
    /* 添加搜索按钮 */
    .search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 35px;
        height: 35px;
        background: transparent;
        border: none;
        color: white;
        font-size: var(--font-size-large);
        cursor: pointer;
        margin-right: 12px;
    }
}

/* 导航栏中的搜索框 */
.nav-search {
    display: flex;
    align-items: center;
    margin-left: 2rem;
}

.nav-search input {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    color: white;
    font-size: var(--font-size-small);
    width: 200px;
    transition: all 0.3s;
}

.nav-search input:focus {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    width: 230px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* 搜索按钮 - 默认隐藏 */
.search-toggle {
    display: none;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer .container p a {
    color: white;
    text-decoration: none;
}

footer .container p a:hover {
    text-decoration: underline;
}

/* 首页项目卡片区 */
.project-list {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 2rem;
  margin-bottom: 2rem;
}

.project-card-link {
  text-decoration: none;
  color: inherit;
  height: 100%;
  display: block;
}

.project-card {
  background: var(--primary-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.3s, transform 0.3s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transform: translateY(-4px) scale(1.02);
}

.project-icon {
  font-size: 2.2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  text-align: center;
}

.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.project-description {
  color: rgba(255,255,255,0.92);
  font-size: 0.97rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  flex: 1;
}

.view-project-btn {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: var(--accent-color);
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
  margin-top: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.project-card-link:hover .view-project-btn {
  background: #fff;
  color: var(--accent-color);
  transform: translateX(3px);
}

/* 响应式布局 */
/* 900px以下：2列 */
@media (max-width: 900px) {
  .project-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* 600px以下：2列 */
@media (max-width: 600px) {
  .project-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.2rem;
  }
  .project-card {
    padding: 1rem;
  }
  .project-title {
    font-size: 1rem;
  }
} 