/* ==========================================================================
   Digitem Programmatic SEO & API Monetizer Pro - Design System (Light & Dark)
   ========================================================================== */

:root {
    --dgt-bg-main: #f8fafc;
    --dgt-bg-card: #ffffff;
    --dgt-bg-muted: #f1f5f9;
    --dgt-text-primary: #0f172a;
    --dgt-text-secondary: #475569;
    --dgt-text-muted: #64748b;
    --dgt-border: #e2e8f0;
    --dgt-primary: #2563eb;
    --dgt-primary-hover: #1d4ed8;
    --dgt-accent: #06b6d4;
    --dgt-success: #16a34a;
    --dgt-radius-lg: 18px;
    --dgt-radius-md: 12px;
    --dgt-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
}

body.sp-night-mode-on,
body.dark-mode {
    --dgt-bg-main: #0b1120;
    --dgt-bg-card: #1e293b;
    --dgt-bg-muted: #0f172a;
    --dgt-text-primary: #f8fafc;
    --dgt-text-secondary: #cbd5e1;
    --dgt-text-muted: #94a3b8;
    --dgt-border: rgba(255, 255, 255, 0.12);
    --dgt-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.dgt-pseo-main {
    background-color: var(--dgt-bg-main);
    padding: 36px 16px 64px;
    direction: rtl;
    text-align: right;
    line-height: 1.75;
    color: var(--dgt-text-primary);
}

.dgt-pseo-container {
    max-width: 1220px;
    margin: 0 auto;
}

/* Breadcrumb */
.dgt-pseo-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--dgt-text-muted);
    margin-bottom: 20px;
    padding: 10px 16px;
    background: var(--dgt-bg-card);
    border: 1px solid var(--dgt-border);
    border-radius: 10px;
}

.dgt-pseo-breadcrumb a {
    color: var(--dgt-primary);
    text-decoration: none;
    font-weight: 600;
}

.dgt-bc-current {
    color: var(--dgt-text-primary);
    font-weight: 700;
}

/* Alerts */
.dgt-pseo-alert {
    padding: 16px 20px;
    border-radius: var(--dgt-radius-md);
    margin-bottom: 22px;
    font-size: 14px;
}

.dgt-alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #14532d;
}

.dgt-alert-warning {
    background: #fef9c3;
    border: 1px solid #fde047;
    color: #713f12;
}

/* Hero Card */
.dgt-pseo-hero {
    background: var(--dgt-bg-card);
    border: 1px solid var(--dgt-border);
    border-radius: var(--dgt-radius-lg);
    padding: 32px;
    box-shadow: var(--dgt-shadow);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.dgt-hero-top-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.dgt-badge-cat {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.16));
    color: var(--dgt-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.dgt-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
}

.dgt-pulse-dot {
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
    display: inline-block;
}

.dgt-badge-date {
    color: var(--dgt-text-muted);
    font-size: 12px;
}

.dgt-hero-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--dgt-text-primary) !important;
    margin: 0 0 12px !important;
    line-height: 1.4 !important;
}

.dgt-hero-subtitle {
    font-size: 15px;
    color: var(--dgt-text-secondary);
    max-width: 850px;
    margin: 0 0 24px;
}

/* KPI Grid */
.dgt-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.dgt-kpi-card {
    background: var(--dgt-bg-muted);
    border: 1px solid var(--dgt-border);
    padding: 16px;
    border-radius: var(--dgt-radius-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dgt-kpi-label {
    font-size: 12px;
    color: var(--dgt-text-muted);
}

.dgt-kpi-val {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--dgt-text-primary);
}

.dgt-kpi-trend {
    font-size: 11px;
    color: var(--dgt-primary);
    font-weight: 600;
}

/* Layout Grid */
.dgt-pseo-content-grid {
    display: grid;
    grid-template-columns: 1.85fr 1fr;
    gap: 24px;
    align-items: start;
}

.dgt-card {
    background: var(--dgt-bg-card);
    border: 1px solid var(--dgt-border);
    border-radius: var(--dgt-radius-lg);
    padding: 26px;
    box-shadow: var(--dgt-shadow);
    margin-bottom: 24px;
}

.dgt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--dgt-border);
    padding-bottom: 12px;
}

.dgt-section-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--dgt-text-primary) !important;
    margin: 0 !important;
}

.dgt-tool-tag {
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
}

/* Interactive Tool */
.dgt-tool-form {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.dgt-input {
    flex: 1;
    height: 46px;
    padding: 0 16px;
    border: 1.5px solid var(--dgt-border);
    border-radius: 10px;
    background: var(--dgt-bg-main);
    color: var(--dgt-text-primary);
    font-size: 14px;
}

.dgt-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    color: #ffffff !important;
    border: none;
    padding: 0 22px;
    height: 46px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dgt-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.dgt-tool-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.dgt-res-header {
    font-weight: 800;
    color: var(--dgt-primary);
    margin-bottom: 6px;
}

/* Specs Table */
.dgt-table-responsive {
    overflow-x: auto;
}

.dgt-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dgt-specs-table th,
.dgt-specs-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--dgt-border);
    text-align: right;
}

.dgt-specs-table thead th {
    background: var(--dgt-bg-muted);
    color: var(--dgt-text-primary);
    font-weight: 800;
}

.dgt-specs-table tbody th {
    width: 38%;
    color: var(--dgt-text-secondary);
    font-weight: 700;
}

.dgt-specs-table tbody td {
    color: var(--dgt-text-primary);
    font-weight: 600;
}

/* FAQ Accordion */
.dgt-faq-item {
    border: 1px solid var(--dgt-border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 14px 18px;
    background: var(--dgt-bg-muted);
}

.dgt-faq-question {
    font-weight: 800;
    font-size: 14.5px;
    cursor: pointer;
    color: var(--dgt-text-primary);
}

.dgt-faq-answer {
    margin-top: 10px;
    font-size: 14px;
    color: var(--dgt-text-secondary);
}

/* Sidebar Paywall Card (Zarinpal) */
.dgt-paywall-card {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: var(--dgt-radius-lg);
    padding: 28px 24px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.25);
    margin-bottom: 22px;
}

.dgt-pw-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
}

.dgt-pw-title {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    margin: 0 0 10px !important;
    line-height: 1.45 !important;
}

.dgt-pw-desc {
    color: #cbd5e1;
    font-size: 13px;
    margin-bottom: 16px;
}

.dgt-pw-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    font-size: 13px;
    color: #e2e8f0;
}

.dgt-pw-features li {
    margin-bottom: 8px;
}

/* Digikala-style Price Pill */
.dgt-pw-price-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dgt-pw-price-label {
    font-size: 13px;
    color: #cbd5e1;
}

.dgt-pw-price-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    background: rgba(15, 23, 42, 0.9);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.dgt-pw-price-num {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
}

.dgt-pw-price-curr {
    font-size: 11.5px;
    color: #38bdf8;
    font-weight: 700;
}

.dgt-pw-input {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    padding: 0 14px;
    margin-bottom: 10px;
    font-size: 13px;
    box-sizing: border-box;
}

.dgt-pw-submit-btn,
.dgt-pw-download-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 14.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
    transition: all 0.2s ease;
}

.dgt-pw-submit-btn:hover,
.dgt-pw-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.5);
}

/* Affiliate Card */
.dgt-affiliate-card {
    background: var(--dgt-bg-card);
    border: 1.5px solid var(--dgt-border);
    border-radius: var(--dgt-radius-lg);
    padding: 22px;
    box-shadow: var(--dgt-shadow);
}

.dgt-aff-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--dgt-primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 3px 10px;
    border-radius: 50px;
}

.dgt-aff-title {
    font-size: 15.5px !important;
    font-weight: 800 !important;
    margin: 10px 0 8px !important;
    color: var(--dgt-text-primary) !important;
}

.dgt-aff-desc {
    font-size: 13px;
    color: var(--dgt-text-secondary);
    margin-bottom: 14px;
}

.dgt-aff-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    background: var(--dgt-bg-muted);
    color: var(--dgt-primary) !important;
    border: 1px solid rgba(37, 99, 235, 0.3);
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.dgt-aff-btn:hover {
    background: var(--dgt-primary);
    color: #ffffff !important;
}

/* Internal Cluster Grid */
.dgt-cluster-section {
    margin-top: 36px;
}

.dgt-pseo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.dgt-pseo-dir-card {
    background: var(--dgt-bg-card);
    border: 1px solid var(--dgt-border);
    border-radius: var(--dgt-radius-md);
    padding: 20px;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.22s ease;
    box-shadow: var(--dgt-shadow);
}

.dgt-pseo-dir-card:hover {
    transform: translateY(-4px);
    border-color: var(--dgt-primary);
}

.dgt-pseo-badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    color: var(--dgt-primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 10px;
}

.dgt-pseo-dir-title {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--dgt-text-primary) !important;
    margin: 0 0 14px !important;
    line-height: 1.5 !important;
}

.dgt-pseo-dir-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--dgt-text-muted);
    border-top: 1px solid var(--dgt-border);
    padding-top: 10px;
}

.dgt-pseo-arrow {
    color: var(--dgt-primary);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 992px) {
    .dgt-pseo-content-grid {
        grid-template-columns: 1fr;
    }
    .dgt-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dgt-pseo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dgt-kpi-grid,
    .dgt-pseo-grid {
        grid-template-columns: 1fr;
    }
    .dgt-tool-form {
        flex-direction: column;
    }
}
