/* 领带打法大全样式 */

/* 领带结选择器 */
.knot-selector {
    margin-bottom: 30px;
}

.knot-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.knot-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s;
    width: calc(33.333% - 10px);
    max-width: 150px;
}

.knot-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.knot-btn.active {
    background-color: #e8f5e9;
    border-color: #4CAF50;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

.knot-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.knot-icon.four-in-hand {
    background-image: url('../images/tie-knots/four-in-hand-icon.svg');
}

.knot-icon.half-windsor {
    background-image: url('../images/tie-knots/half-windsor-icon.svg');
}

.knot-icon.windsor {
    background-image: url('../images/tie-knots/windsor-icon.svg');
}

.knot-icon.pratt {
    background-image: url('../images/tie-knots/pratt-icon.svg');
}

.knot-icon.bow-tie {
    background-image: url('../images/tie-knots/bow-tie-icon.svg');
}

.knot-icon.eldredge {
    background-image: url('../images/tie-knots/eldredge-icon.svg');
}

.knot-btn span {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* 领带结详情 */
.knot-detail {
    display: none;
    margin-bottom: 40px;
}

.knot-detail.active {
    display: block;
}

.knot-header {
    margin-bottom: 30px;
}

.knot-header h2 {
    margin-bottom: 15px;
    color: #333;
}

.knot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.tag.difficulty {
    background-color: #e3f2fd;
    color: #1976d2;
}

.tag.formality {
    background-color: #fce4ec;
    color: #c2185b;
}

.tag.collar {
    background-color: #f1f8e9;
    color: #689f38;
}

.knot-description {
    line-height: 1.6;
    color: #555;
}

/* 步骤展示 */
.knot-steps {
    margin-bottom: 30px;
}

.knot-steps h3 {
    margin-bottom: 20px;
    color: #333;
}

.steps-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.step {
    display: flex;
    flex-direction: column;
    width: calc(33.333% - 14px);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.step-image {
    height: 200px;
    overflow: hidden;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.step-description {
    padding: 15px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 15px;
    width: 30px;
    height: 30px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step-description p {
    margin-top: 10px;
    color: #555;
    line-height: 1.5;
}

/* 小贴士 */
.knot-tips {
    margin-bottom: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.knot-tips h3 {
    margin-bottom: 15px;
    color: #333;
}

.knot-tips ul {
    padding-left: 20px;
}

.knot-tips li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.5;
}

/* 视频教程 */
.knot-video {
    margin-bottom: 30px;
}

.knot-video h3 {
    margin-bottom: 15px;
    color: #333;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 领带选择指南 */
.tie-guide {
    margin-bottom: 30px;
}

.guide-content {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.guide-section {
    margin-bottom: 25px;
}

.guide-section:last-child {
    margin-bottom: 0;
}

.guide-section h4 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.guide-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.guide-item h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.guide-item p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

/* 常见问题 */
.faq-section {
    margin-bottom: 30px;
}

.faq-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.faq-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.faq-question h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.toggle-icon {
    font-size: 20px;
    color: #4CAF50;
    transition: transform 0.3s;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 10px 0;
    color: #555;
    line-height: 1.5;
}

.faq-item.active .faq-answer {
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .knot-btn {
        width: calc(50% - 10px);
    }
    
    .step {
        width: calc(50% - 10px);
    }
    
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .knot-btn {
        width: 100%;
        max-width: none;
    }
    
    .step {
        width: 100%;
    }
    
    .knot-tags {
        flex-direction: column;
    }
}