/* ═══════════════════════════════════════════════════════════════════
   DermaSEO Pro — Frontend Premium Styles
   ═══════════════════════════════════════════════════════════════════ */

/* ── TIPOGRAFIE & SPAȚIERE ──────────────────────────────────────── */

/* Primul paragraf — lead text */
.entry-content > p:first-of-type,
.dspro-article > p:first-of-type,
#article-content > p:first-of-type {
    font-size: 1.15em;
    line-height: 1.75;
    color: #1e293b;
    font-weight: 450;
}

/* Spațiu generos între secțiuni */
.entry-content h2,
.dspro-article h2,
#article-content h2 {
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    padding-bottom: 0.4em;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    padding-left: 16px;
    font-size: 1.5em;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

/* Accent bară verticală pe H2 */
.entry-content h2::before,
.dspro-article h2::before,
#article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.55em;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #7c3aed);
    border-radius: 4px;
}

/* Separator subtil gradient între secțiuni — linie care se estompează */
.entry-content h2::after,
.dspro-article h2::after,
#article-content h2::after {
    content: '';
    display: block;
    width: 60%;
    max-width: 300px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
    margin: -0.2em 0 0;
    position: absolute;
    bottom: -1px;
    left: 16px;
}

/* Primul H2 fără separator deasupra */
.entry-content h2:first-of-type,
.dspro-article h2:first-of-type,
#article-content h2:first-of-type {
    margin-top: 1.5em;
}

.entry-content h3,
.dspro-article h3,
#article-content h3 {
    margin-top: 1.8em;
    margin-bottom: 0.5em;
    font-size: 1.2em;
    font-weight: 700;
    color: #1e293b;
}

/* Paragrafe cu line-height generos */
.entry-content p,
.dspro-article p,
#article-content p {
    line-height: 1.8;
    margin-bottom: 1.2em;
    color: #334155;
}

/* ── LISTE CU BULLET CUSTOM ────────────────────────────────────── */

.entry-content ul,
.dspro-article ul,
#article-content ul {
    list-style: none;
    padding-left: 0;
    margin: 1em 0 1.5em;
}

.entry-content ul > li,
.dspro-article ul > li,
#article-content ul > li {
    position: relative;
    padding-left: 24px;
    padding-bottom: 8px;
    margin-bottom: 4px;
    line-height: 1.7;
    color: #334155;
}

.entry-content ul > li::before,
.dspro-article ul > li::before,
#article-content ul > li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    flex-shrink: 0;
}

/* Ordered lists — custom numbers */
.entry-content ol,
.dspro-article ol,
#article-content ol {
    list-style: none;
    padding-left: 0;
    counter-reset: dspro-counter;
    margin: 1em 0 1.5em;
}

.entry-content ol > li,
.dspro-article ol > li,
#article-content ol > li {
    position: relative;
    padding-left: 36px;
    padding-bottom: 8px;
    margin-bottom: 4px;
    line-height: 1.7;
    color: #334155;
    counter-increment: dspro-counter;
}

.entry-content ol > li::before,
.dspro-article ol > li::before,
#article-content ol > li::before {
    content: counter(dspro-counter);
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ── TABELE PREMIUM ────────────────────────────────────────────── */

.entry-content table,
.dspro-article table,
#article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    margin: 1.5em 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.entry-content table thead th,
.dspro-article table thead th,
#article-content table thead th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: #475569;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.entry-content table tbody td,
.dspro-article table tbody td,
#article-content table tbody td {
    padding: 12px 16px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.6;
}

/* Zebra stripes */
.entry-content table tbody tr:nth-child(even),
.dspro-article table tbody tr:nth-child(even),
#article-content table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.entry-content table tbody tr:hover,
.dspro-article table tbody tr:hover,
#article-content table tbody tr:hover {
    background: #eff6ff;
    transition: background .15s;
}

/* ── BLOCKQUOTE MEDICAL ────────────────────────────────────────── */

.entry-content blockquote,
.dspro-article blockquote,
#article-content blockquote {
    border-left: 4px solid #2563eb;
    background: #f8fafc;
    margin: 1.5em 0;
    padding: 16px 20px;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #475569;
    line-height: 1.7;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* ── FAQ ACORDEON ──────────────────────────────────────────────── */

.dspro-faq-block {
    margin: 2em 0;
}

.dspro-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.dspro-faq-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.dspro-faq-q {
    background: #f8fafc;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background .15s;
}

.dspro-faq-q:hover {
    background: #f1f5f9;
}

/* Toggle icon rotation */
.dspro-faq-q .dspro-faq-toggle {
    font-size: 20px;
    color: #2563eb;
    transition: transform .25s ease;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 12px;
}

.dspro-faq-item.dspro-faq-open .dspro-faq-toggle {
    transform: rotate(45deg);
}

.dspro-faq-a {
    padding: 0 20px !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height .3s ease, padding .3s ease;
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
}

.dspro-faq-item.dspro-faq-open .dspro-faq-a {
    max-height: 500px !important;
    padding: 16px 20px !important;
    border-top: 1px solid #e2e8f0;
}

/* ── PROGRESS BAR ──────────────────────────────────────────────── */

.dspro-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    z-index: 99999;
    transition: width .1s linear;
    pointer-events: none;
}

/* ── BACK TO TOP ───────────────────────────────────────────────── */

.dspro-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s, transform .3s;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
}

.dspro-back-to-top.dspro-visible {
    opacity: 1;
    visibility: visible;
}

.dspro-back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}

/* ── TIMP DE CITIRE ────────────────────────────────────────────── */

.dspro-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.dspro-reading-time svg {
    width: 14px;
    height: 14px;
    fill: #94a3b8;
}

/* ── SEPARATOARE ÎNTRE SECȚIUNI ─────────────────────────────────── */

.entry-content h2 + *,
.dspro-article h2 + * {
    margin-top: 0.8em;
}

/* ── RESPONSIVE — MOBILE ───────────────────────────────────────── */

@media (max-width: 768px) {
    /* Grid-uri 2 coloane → 1 coloana */
    .dspro-myth,
    .dspro-semafor,
    .dspro-versus {
        grid-template-columns: 1fr !important;
    }

    /* Box-uri — padding redus */
    .dspro-summary,
    .dspro-box-info,
    .dspro-box-warning,
    .dspro-box-tip,
    .dspro-box-science,
    .dspro-box-case,
    .dspro-box-didyouknow,
    .dspro-verdict,
    .dspro-urgent,
    .dspro-timeline,
    .dspro-stat,
    .dspro-disclaimer,
    .dspro-cta {
        padding: 14px 16px !important;
        margin-left: -4px !important;
        margin-right: -4px !important;
    }

    /* Tabele scrollabile */
    .entry-content table,
    .dspro-article table,
    #article-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* FAQ — font size */
    .dspro-faq-q {
        font-size: 14px;
        padding: 14px 16px;
    }

    /* H2 mai mic pe mobil */
    .entry-content h2,
    .dspro-article h2,
    #article-content h2 {
        font-size: 1.3em;
    }

    /* CTA — padding redus */
    .dspro-cta {
        padding: 20px 16px !important;
    }

    .dspro-back-to-top {
        bottom: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ── DARK MODE ─────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .entry-content p,
    .dspro-article p {
        color: #cbd5e1;
    }

    .entry-content h2,
    .dspro-article h2 {
        color: #f1f5f9;
        border-bottom-color: #334155;
    }

    .entry-content h3,
    .dspro-article h3 {
        color: #e2e8f0;
    }

    .entry-content ul > li,
    .entry-content ol > li,
    .dspro-article ul > li,
    .dspro-article ol > li {
        color: #cbd5e1;
    }

    /* Tabele dark */
    .entry-content table,
    .dspro-article table {
        border-color: #334155;
    }

    .entry-content table thead th,
    .dspro-article table thead th {
        background: linear-gradient(135deg, #1e293b, #0f172a);
        color: #94a3b8;
        border-bottom-color: #334155;
    }

    .entry-content table tbody td,
    .dspro-article table tbody td {
        color: #cbd5e1;
        border-bottom-color: #1e293b;
    }

    .entry-content table tbody tr:nth-child(even),
    .dspro-article table tbody tr:nth-child(even) {
        background: #0f172a;
    }

    .entry-content table tbody tr:hover,
    .dspro-article table tbody tr:hover {
        background: #1e293b;
    }

    /* Blockquote dark */
    .entry-content blockquote,
    .dspro-article blockquote {
        background: #1e293b;
        color: #94a3b8;
        border-left-color: #3b82f6;
    }

    /* FAQ dark */
    .dspro-faq-q {
        background: #1e293b;
        color: #e2e8f0;
    }

    .dspro-faq-q:hover {
        background: #334155;
    }

    .dspro-faq-a {
        color: #94a3b8;
    }

    .dspro-faq-item {
        border-color: #334155;
    }

    .dspro-faq-item.dspro-faq-open .dspro-faq-a {
        border-top-color: #334155;
    }
}
