/* Guide Page Specific Styles */

/* Disable smooth scrolling (use instant jump) */
html {
    scroll-behavior: auto !important;
}

/* Main layout container: under the fixed navbar, full-height flex */
.guide-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.guide-sidebar {
    position: sticky;
    top: 76px; /* stick under navbar */
    align-self: flex-start;
    width: 280px;
    max-height: calc(100vh - 76px);
    /* 使用不透明的深色背景, 避免在手机上看到后面的内容透出来 */
    background-color: var(--background-black);
    border-right: 1px solid var(--border-dark-green);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-dark-green);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h5 {
    color: var(--text-white);
    margin: 0;
    font-size: 1.25rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    display: none;
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--border-light-green);
    border-radius: 50%;
    color: var(--text-white);
    font-size: 1.25rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--bg-dark);
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-link i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.sidebar-link:hover {
    color: var(--text-white);
    background: rgba(0, 255, 0, 0.05);
    border-left-color: var(--primary-green);
}

.sidebar-link.active {
    color: var(--primary-green);
    background: rgba(0, 255, 0, 0.1);
    border-left-color: var(--primary-green);
}

/* Mobile Sidebar Toggle */
.sidebar-mobile-toggle {
    position: fixed;
    top: 90px;
    left: 1rem;
    width: 50px;
    height: 50px;
    background: var(--primary-dark-green);
    border: 2px solid var(--border-light-green);
    border-radius: 50%;
    color: var(--text-white);
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-mobile-toggle:hover {
    background: var(--primary-green);
    transform: scale(1.1);
}

/* Main Content Styles */
.guide-content {
    flex: 1;
    margin-left: 0;
    /* 上 右 下 左: 顶部高度 ~= 导航栏高度, 避免被 fixed navbar 遮住 */
    padding: 90px 1.5rem 3rem 1.5rem;
    min-height: 100vh;
}

.guide-content-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    display: none;
    padding: 0; /* override global section padding from style.css */
    margin: 0;
}

.content-section.active {
    display: block;
}

.content-title {
    color: var(--text-white);
    font-size: 2.5rem;
    margin-top: 20px;
    margin-bottom: 1.5rem;
    padding-top: 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light-green);
}

.content-block {
    margin-bottom: 2.5rem;
}

.content-block h4 {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.content-block p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    height: 540px;
    margin: 1.5rem 0;
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Steps List */
.steps-list {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
    padding-left: 1.5rem;
}

.steps-list li {
    margin-bottom: 1.5rem;
}

.steps-list strong {
    color: var(--text-white);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.steps-list p {
    margin: 0.5rem 0 0 0;
    color: var(--text-gray);
}

/* Alert Styles */
.alert {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid;
    margin: 1.5rem 0;
}

.alert i {
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.alert-info {
    background: rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
    color: #4dabf7;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffd43b;
}

/* Brands Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.brand-card {
    background-color: var(--background-black);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-dark-green);
    transition: all 0.3s ease;
}

.brand-card:hover {
    border-color: var(--border-light-green);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    transform: translateY(-3px);
}

.brand-card h6 {
    color: var(--primary-green);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.brand-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Footer Adjustments */
.footer {
    margin-top: 0;
}

.footer-link {
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--text-white);
}

/* Responsive Design */
@media (max-width: 991px) {
    .guide-container {
        flex-direction: column;
        margin-top: 76px;
    }

    .guide-sidebar {
        position: fixed;
        top: 76px;
        left: 0;
        width: 100%;              /* 手机端占满整行，避免右侧内容透出来 */
        transform: translateX(-100%);
        max-height: calc(100vh - 76px);
        border-right: none;
        border-bottom: 1px solid var(--border-dark-green);
    }

    .guide-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-close {
        display: flex;
    }

    .sidebar-mobile-toggle {
        display: flex;
    }

    .guide-content {
        margin-left: 0;
        /* 上 右 下 左: 给标题留一点空间, 不要贴着导航栏 */
        padding: 72px 1.5rem 2rem 1.5rem;
        min-height: auto;
    }

    .content-title {
        font-size: 2rem;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    .video-container {
        height: 400px;
    }
}

@media (max-width: 767px) {
    .guide-content {
        /* 小屏再略微收紧左右间距 */
        padding: 64px 1rem 1.5rem 1rem;
    }
    
    .content-title {
        font-size: 1.75rem;
    }
    
    .content-block h4 {
        font-size: 1.25rem;
    }
    
    .content-block p,
    .steps-list {
        font-size: 1rem;
    }
    
    .steps-list strong {
        font-size: 1.1rem;
    }
    
    .video-container {
        height: 300px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
.guide-sidebar::-webkit-scrollbar {
    width: 6px;
}

.guide-sidebar::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.guide-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-dark-green);
    border-radius: 3px;
}

.guide-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--border-light-green);
}

