/* OpsAny 首页自定义样式 - 华为云风格 */

/* 隐藏首页的标准导航和侧边栏 */
.md-content__inner.homepage-container ~ * .md-sidebar {
    display: none;
}

/* 首页内容区域调整 */
.homepage-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background: #fff;
}

/* 调整首页容器的布局 */
.md-content[data-md-component="content"] .homepage-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 首页标题区域优化 */
.homepage-header {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: -24px -24px 0;
    color: white;
    position: relative;
}

.homepage-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.homepage-title {
    position: relative;
    z-index: 1;
}

.homepage-title h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.homepage-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin: 0 auto;
    max-width: 700px;
    line-height: 1.6;
}

/* 搜索框增强样式 */
.homepage-search {
    padding: 50px 20px;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.search-box:hover,
.search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 18px 25px;
    font-size: 16px;
    background: transparent;
    border-radius: 30px;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    padding: 14px 18px;
    border-radius: 25px;
    margin: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-btn svg {
    fill: white;
    width: 22px;
    height: 22px;
}

/* 分区标题优化 */
.homepage-section {
    margin-bottom: 70px;
    padding: 0 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f2f5;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-tag {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.view-all {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid transparent;
}

.view-all:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 文档卡片增强 */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.doc-card {
    display: flex;
    align-items: center;
    padding: 25px;
    background: white;
    border: 1px solid #e8ecef;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.doc-card:hover::before {
    transform: scaleY(1);
}

.doc-icon {
    width: 60px;
    height: 60px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.doc-card:hover .doc-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.doc-icon img {
    width: 36px;
    height: 36px;
    transition: filter 0.3s ease;
}

.doc-card:hover .doc-icon img {
    filter: brightness(0) invert(1);
}

.doc-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.doc-card:hover .doc-content h3 {
    color: #667eea;
}

.doc-content p {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* 分类网格增强 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.category-section {
    background: white;
    border: 1px solid #e8ecef;
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-section:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: #667eea;
    transform: translateY(-2px);
}

.category-section:hover::before {
    transform: scaleX(1);
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-icon {
    width: 32px;
    height: 32px;
}

.category-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-links a {
    color: #6c757d;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    padding-left: 20px;
}

.category-links a::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.category-links a:hover {
    color: #667eea;
    padding-left: 25px;
}

.category-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.category-links a:last-child {
    border-bottom: none;
}

/* 新手入门区域增强 */
.getting-started-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.getting-started-card {
    display: flex;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e8ecef;
    position: relative;
    overflow: hidden;
}

.getting-started-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.getting-started-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.card-icon {
    width: 70px;
    height: 70px;
    margin-right: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.getting-started-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.card-icon img {
    width: 42px;
    height: 42px;
}

.card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.card-content p {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* 响应式设计优化 */
@media (max-width: 1024px) {
    .homepage-container {
        padding: 0 15px;
    }
    
    .homepage-section {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .homepage-title h1 {
        font-size: 2.2rem;
    }
    
    .homepage-subtitle {
        font-size: 1rem;
    }
    
    .homepage-header {
        padding: 40px 0 30px;
    }
    
    .homepage-search {
        padding: 30px 15px;
    }
    
    .doc-grid,
    .category-grid,
    .getting-started-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-input {
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .doc-card,
    .getting-started-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .doc-icon,
    .card-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .category-section {
        padding: 20px;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .homepage-container {
        padding: 0 10px;
    }
    
    .homepage-section {
        padding: 0 10px;
        margin-bottom: 50px;
    }
    
    .homepage-title h1 {
        font-size: 1.8rem;
    }
    
    .search-container {
        padding: 0 10px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.homepage-section {
    animation: fadeInUp 0.6s ease forwards;
}

.homepage-section:nth-child(2) { animation-delay: 0.1s; }
.homepage-section:nth-child(3) { animation-delay: 0.2s; }
.homepage-section:nth-child(4) { animation-delay: 0.3s; }
.homepage-section:nth-child(5) { animation-delay: 0.4s; }