/* static/css/guide.css */

.guide-section {
    background: linear-gradient(135deg, rgba(108, 60, 225, 0.03), rgba(236, 72, 153, 0.015));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    margin-bottom: 3rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .guide-section {
    background: rgba(108, 60, 225, 0.02);
}

.guide-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(108, 60, 225, 0.01), transparent 70%);
    animation: guideGlow 8s infinite alternate;
}

@keyframes guideGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20%, -20%) scale(1.2); }
}

.guide-section:hover {
    border-color: rgba(108, 60, 225, 0.06);
}

.guide-section .guide-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.guide-section .guide-header i {
    font-size: 1.8rem;
    color: var(--gold);
    animation: headerIconPulse 3s infinite alternate;
}

@keyframes headerIconPulse {
    0% { filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.05)); transform: scale(1); }
    100% { filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.1)); transform: scale(1.05); }
}

.guide-section .guide-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.guide-section .guide-header h3 span {
    background: linear-gradient(135deg, var(--gold), #D97706);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* ===== جستجو ===== */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: all 0.3s ease;
    overflow: hidden;
}

[data-theme="light"] .search-box {
    background: rgba(0, 0, 0, 0.04);
}

.search-box:focus-within {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 30px rgba(108, 60, 225, 0.05);
    background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .search-box:focus-within {
    background: rgba(0, 0, 0, 0.06);
}

.search-box .search-icon {
    position: absolute;
    right: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.3s;
}

.search-box:focus-within .search-icon {
    color: var(--primary-light);
}

.search-box input {
    width: 100%;
    padding: 0.8rem 3rem 0.8rem 2.8rem;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    display: block;
    direction: rtl;
}

[data-theme="light"] .search-box input {
    color: var(--text-main);
}

.search-box input::placeholder {
    color: var(--text-secondary);
    font-weight: 300;
}

.search-box .search-clear {
    position: absolute;
    left: 0.8rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: all 0.3s;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.search-box .search-clear:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: rotate(90deg);
}

[data-theme="light"] .search-box .search-clear:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.search-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.2rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    opacity: 0.6;
    transition: all 0.3s;
}

.search-hint i {
    font-size: 0.6rem;
    color: var(--gold);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 10;
    padding: 0.5rem 0;
}

[data-theme="light"] .search-results {
    background: #F0F0F5;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.search-results .cmd-item {
    padding: 0.6rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    transition: background 0.2s;
}

.search-results .cmd-item:last-child {
    border-bottom: none;
}

.search-results .cmd-item:hover {
    background: rgba(108, 60, 225, 0.04);
}

[data-theme="light"] .search-results .cmd-item:hover {
    background: rgba(108, 60, 225, 0.06);
}

.search-results .cmd-item .cmd-code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #A78BFA;
    background: rgba(108, 60, 225, 0.08);
    padding: 0.1rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
    border: 1px solid rgba(108, 60, 225, 0.03);
}

.search-results .cmd-item .cmd-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.search-results .cmd-item .cmd-desc .highlight-desc {
    color: var(--text-main);
    font-weight: 500;
}

.search-results .no-result {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-results .no-result i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

.search-results::-webkit-scrollbar {
    width: 3px;
}
.search-results::-webkit-scrollbar-track {
    background: transparent;
}
.search-results::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* ===== آکاردئون ===== */
.accordion {
    position: relative;
    z-index: 1;
}

.accordion-item {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 0.6rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s;
}

[data-theme="light"] .accordion-item {
    background: rgba(0, 0, 0, 0.03);
}

.accordion-item:hover {
    border-color: rgba(108, 60, 225, 0.06);
}

.accordion-item.active {
    border-color: rgba(108, 60, 225, 0.1);
}

.accordion-header {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    transition: all 0.3s;
    text-align: right;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.015);
}

[data-theme="light"] .accordion-header:hover {
    background: rgba(0, 0, 0, 0.015);
}

.accordion-header .header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.accordion-header .header-left i {
    font-size: 1rem;
    color: var(--primary-light);
    width: 20px;
    text-align: center;
}

.accordion-header .arrow {
    transition: transform 0.3s;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.accordion-item.active .accordion-header .arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.2rem;
}

.accordion-item.active .accordion-content {
    max-height: 3000px;
    padding: 0 1.2rem 1.2rem;
}

.accordion-content .cmd-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .accordion-content .cmd-item {
    border-bottom-color: rgba(0, 0, 0, 0.02);
}

.accordion-content .cmd-item:last-child {
    border-bottom: none;
}

.accordion-content .cmd-item .cmd-code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #A78BFA;
    background: rgba(108, 60, 225, 0.08);
    padding: 0.1rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
    border: 1px solid rgba(108, 60, 225, 0.03);
    position: relative;
}

.accordion-content .cmd-item .cmd-code .copy-cmd {
    position: absolute;
    top: 50%;
    left: -28px;
    transform: translateY(-50%);
    background: rgba(108, 60, 225, 0.08);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    font-size: 0.55rem;
    transition: all 0.3s;
    opacity: 0;
}

.accordion-content .cmd-item:hover .cmd-code .copy-cmd {
    opacity: 1;
}

.accordion-content .cmd-item .cmd-code .copy-cmd:hover {
    background: rgba(108, 60, 225, 0.15);
    color: var(--primary-light);
}

.accordion-content .cmd-item .cmd-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.accordion-content .cmd-item .cmd-desc .highlight-desc {
    color: var(--text-main);
    font-weight: 500;
}

.accordion-content .cmd-item .cmd-desc .example {
    color: var(--gold);
    font-weight: 500;
    background: rgba(245, 158, 11, 0.04);
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
}

.accordion-content .cmd-item .cmd-desc .feature-desc {
    color: var(--secondary);
    font-weight: 400;
}

/* ===== FAQ ===== */
.faq-section {
    background: linear-gradient(135deg, rgba(108, 60, 225, 0.03), rgba(236, 72, 153, 0.015));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    margin-top: 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .faq-section {
    background: rgba(108, 60, 225, 0.02);
}

.faq-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(108, 60, 225, 0.01), transparent 70%);
    animation: faqGlow 8s infinite alternate;
}

@keyframes faqGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    100% { transform: translate(-20%, -20%) scale(1.2); opacity: 0.5; }
}

.faq-item {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 0.6rem;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

[data-theme="light"] .faq-item {
    background: rgba(0, 0, 0, 0.03);
}

.faq-item:hover {
    border-color: rgba(108, 60, 225, 0.06);
}

.faq-item.active {
    border-color: rgba(108, 60, 225, 0.1);
}

.faq-question {
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    gap: 0.8rem;
}

.faq-question .arrow {
    transition: transform 0.3s;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.faq-item.active .faq-question .arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.2rem 1.2rem;
}