/* ═══════════════════════════════════════
   REBHNI DOCS & TUTORIALS PAGE
   Depends on: public/css/saas/design-system.css
   ═══════════════════════════════════════ */

/* ─── 1. DOCS HERO ─────────────────────────────────────────────── */
.docs-hero {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: calc(68px + var(--section-pad));
    padding-bottom: var(--section-pad);
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(13,148,136,0.09) 0%, transparent 65%),
        var(--charcoal-deep);
    position: relative;
    overflow: hidden;
}

.docs-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--teal-glow) 0%, transparent 70%);
    opacity: 0.12;
    pointer-events: none;
}

.docs-hero .container {
    position: relative;
    z-index: var(--z-content);
}

.docs-hero .section-title {
    margin-bottom: 16px;
}

.docs-hero .section-subtitle {
    margin: 0 auto;
}

/* Search bar inside hero */
.docs-search {
    max-width: 520px;
    margin: 36px auto 0;
    position: relative;
}

.docs-search .form-input {
    padding-left: 48px;
    padding-right: 20px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.docs-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 1rem;
    pointer-events: none;
}

/* ─── 2. GUIDE CARDS (Getting Started) ─────────────────────────── */
.guide-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 36px 32px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.guide-card:hover {
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.guide-card:hover::before {
    opacity: 1;
}

.guide-number {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--teal);
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.85;
}

.guide-card .guide-icon {
    font-size: 1.6rem;
    color: var(--teal-light);
    margin-bottom: 16px;
    display: block;
}

.guide-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.guide-card p {
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.75;
}

.guide-card .guide-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    color: var(--teal-light);
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.3s ease, color 0.3s ease;
}

.guide-card .guide-link:hover {
    gap: 10px;
    color: var(--white);
    text-decoration: none;
}

/* ─── 3. VIDEO CARDS (Tutorials) ───────────────────────────────── */
.video-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.video-card:hover {
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--charcoal-mid) 0%, var(--charcoal-deep) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
    opacity: 0.7;
}

.video-thumb .play-icon {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    box-shadow: 0 4px 24px var(--teal-glow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    z-index: 2;
}

.video-card:hover .play-icon {
    transform: scale(1.12);
    box-shadow: 0 8px 40px var(--teal-glow), 0 0 60px rgba(13,148,136,0.2);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
    font-family: var(--font-body);
}

[dir="rtl"] .video-duration {
    right: auto;
    left: 10px;
}

.video-card .video-info {
    padding: 20px 24px 24px;
}

.video-card .video-info h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
    line-height: 1.4;
}

.video-card .video-info p {
    color: var(--gray-400);
    font-size: 0.88rem;
    line-height: 1.6;
}

.video-card .video-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ─── 4. API DOCUMENTATION SECTION ─────────────────────────────── */
.api-section {
    background: var(--charcoal-mid);
}

.api-section .section-title {
    margin-bottom: 12px;
}

.api-endpoint-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.92rem;
}

.api-endpoint:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
}

.api-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: var(--font-heading);
    flex-shrink: 0;
}

.api-method--get {
    background: rgba(34,197,94,0.12);
    color: var(--green);
    border: 1px solid rgba(34,197,94,0.2);
}

.api-method--post {
    background: rgba(59,130,246,0.12);
    color: #3B82F6;
    border: 1px solid rgba(59,130,246,0.2);
}

.api-method--put {
    background: rgba(245,158,11,0.12);
    color: var(--amber);
    border: 1px solid rgba(245,158,11,0.2);
}

.api-method--delete {
    background: rgba(239,68,68,0.12);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.2);
}

.api-method--patch {
    background: rgba(168,85,247,0.12);
    color: #A855F7;
    border: 1px solid rgba(168,85,247,0.2);
}

.api-path {
    color: var(--gray-300);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-path span {
    color: var(--teal-light);
}

.api-desc {
    color: var(--gray-500);
    font-size: 0.82rem;
    font-family: var(--font-body);
    flex-shrink: 0;
    max-width: 240px;
    text-align: right;
}

[dir="rtl"] .api-desc {
    text-align: left;
}

/* ─── 5. DOCS FAQ ──────────────────────────────────────────────── */
.docs-faq-list {
    margin-top: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.docs-faq-item {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.docs-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-300);
    gap: 16px;
    transition: color 0.2s ease;
}

[dir="rtl"] .docs-faq-question {
    text-align: right;
}

.docs-faq-question:hover {
    color: var(--teal-light);
}

.docs-faq-chevron {
    flex-shrink: 0;
    color: var(--gray-400);
    transition: transform 0.3s ease, color 0.2s ease;
    font-size: 1rem;
}

.docs-faq-item.open .docs-faq-chevron {
    transform: rotate(180deg);
    color: var(--teal-light);
}

.docs-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}

.docs-faq-item.open .docs-faq-answer {
    max-height: 300px;
}

.docs-faq-answer-inner {
    padding-bottom: 22px;
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.85;
}

/* ─── 6. RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .api-desc {
        display: none;
    }

    .api-endpoint {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .docs-hero {
        min-height: 320px;
        padding-top: calc(68px + var(--section-pad-mobile));
        padding-bottom: var(--section-pad-mobile);
    }

    .guide-card {
        padding: 28px 24px;
    }

    .guide-number {
        font-size: 2.4rem;
    }

    .video-thumb .play-icon {
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }

    .video-card .video-info {
        padding: 16px 20px 20px;
    }

    .api-endpoint {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 18px;
        font-size: 0.82rem;
    }

    .api-method {
        min-width: 56px;
        padding: 4px 10px;
        font-size: 0.68rem;
    }

    .api-path {
        white-space: normal;
        word-break: break-all;
    }

    .docs-faq-question {
        font-size: 0.95rem;
        padding: 18px 0;
    }
}

@media (max-width: 480px) {
    .docs-hero {
        min-height: 280px;
    }

    .guide-number {
        font-size: 2rem;
    }

    .guide-card h3 {
        font-size: 1.05rem;
    }

    .video-card .video-info h3 {
        font-size: 0.95rem;
    }

    .api-endpoint {
        padding: 12px 14px;
    }

    .docs-search .form-input {
        font-size: 0.92rem;
    }
}
