/* ============================================================================
 *  SIMCO — Editorial / Blog styling
 *  Rezolvă: (1) diferențierea clară H2 vs H3 vs H4 în articole
 *           (2) tabelele din articole care nu erau stilizate deloc
 *  Domeniu: conținutul articolelor (.article-content) + pagini generice
 * ========================================================================== */

/* ----------------------------------------------------------------------------
 *  1. IERARHIE TITLURI ÎN CONȚINUTUL ARTICOLELOR
 *  Tema nu definea font-size pentru h2/h3 în conținut, așa că ajungeau
 *  aproape identice. Stabilim o ierarhie tipografică explicită și distinctă.
 * -------------------------------------------------------------------------- */
.article-content h2,
.read-more-continut h2 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    color: #16213e;                 /* bleumarin închis */
    margin: 44px 0 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3137fd; /* accent albastru de brand */
}

.article-content h3,
.read-more-continut h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 21px;
    line-height: 1.35;
    font-weight: 600;
    color: #832B27;                 /* grena de brand — culoare diferită față de H2 */
    margin: 34px 0 14px;
    padding-left: 14px;
    border-left: 4px solid #832B27; /* bară laterală pentru contrast vizual clar */
}

.article-content h4,
.read-more-continut h4 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    color: #16213e;
    margin: 26px 0 10px;
    text-transform: none;
}

.article-content h5,
.read-more-continut h5 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin: 22px 0 8px;
}

/* Primul titlu să nu împingă prea mult conținutul */
.article-content > h2:first-child,
.article-content > h3:first-child {
    margin-top: 8px;
}

/* Lizibilitate paragrafe în articole */
.article-content p {
    line-height: 1.75;
    margin-bottom: 18px;
}

/* ----------------------------------------------------------------------------
 *  2. TABELE ÎN ARTICOLE
 *  Înainte nu existau reguli CSS pentru <table>, deci tabelele apăreau
 *  nestilizate / „invizibile". Adăugăm stilizare completă și responsive.
 * -------------------------------------------------------------------------- */
.article-content table,
.read-more-continut table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15px;
    line-height: 1.5;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    overflow: hidden;               /* păstrează colțurile rotunjite */
    box-shadow: 0 2px 14px rgba(0, 0, 0, .06);
}

.article-content table th,
.article-content table td,
.read-more-continut table th,
.read-more-continut table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
    color: #333;
}

/* Antet tabel */
.article-content table thead th,
.read-more-continut table thead th {
    background: #16213e;
    color: #fff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .2px;
    border-bottom: none;
}

/* Dacă tabelul nu are <thead>, stilizăm primul rând ca antet */
.article-content table tr:first-child th,
.read-more-continut table tr:first-child th {
    background: #16213e;
    color: #fff;
}

/* Rânduri alternante (zebra) */
.article-content table tbody tr:nth-child(even),
.read-more-continut table tbody tr:nth-child(even) {
    background: #f6f8fc;
}

.article-content table tbody tr:hover,
.read-more-continut table tbody tr:hover {
    background: #eef2fb;
}

.article-content table tr:last-child td,
.read-more-continut table tr:last-child td {
    border-bottom: none;
}

/* Captiune tabel */
.article-content table caption,
.read-more-continut table caption {
    caption-side: bottom;
    font-size: 13px;
    color: #888;
    padding: 8px 0;
    text-align: left;
}

/* ----------------------------------------------------------------------------
 *  3. RESPONSIVE — tabele cu derulare orizontală pe mobil
 * -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .article-content table,
    .read-more-continut table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .article-content h2,
    .read-more-continut h2 {
        font-size: 23px;
    }

    .article-content h3,
    .read-more-continut h3 {
        font-size: 19px;
    }
}

/* ============================================================================
 *  4. CORECȚII DE BRAND / LAYOUT
 * -------------------------------------------------------------------------- */

/* Eliminăm logo-ul ENEL învechit din secțiunea „Partener PPC Energie România".
 * Enel a fost preluat de PPC în 2023, iar titlul conține deja textul „PPC".
 * Scoatem pseudo-elementul cu logo-ul vechi și aliniem titlul la stânga.
 * (Dacă dorești logo-ul PPC aici, urcă images/partener-ppc.png în temă și
 *  înlocuiește regula `display:none` de mai jos cu background-image.) */
.block3 h2::before {
    display: none !important;
    content: none !important;
}

.block3 h2 {
    padding-left: 0 !important;
}

/* ============================================================================
 *  5. FAQ VIZIBIL (paginile de serviciu) — în tonul temei
 *  Carduri albe, colțuri rotunjite, umbra temei, Montserrat, accent #3137fd.
 *  Acordeon nativ <details>/<summary> (fără JS).
 * -------------------------------------------------------------------------- */
.simco-faq {
    margin: 48px auto 12px;
    max-width: 900px;   /* nu se mai întinde pe toată lățimea pe desktop */
}

.simco-faq__title {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #16213e;
    margin: 0 0 24px;
    padding-bottom: 10px;
    position: relative;
}

.simco-faq__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    background: #3137fd;
    border-radius: 3px;
}

.simco-faq__item {
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 10px;
    box-shadow: 0px 5px 30px -10px rgba(0, 0, 0, 0.15);
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.simco-faq__item[open] {
    border-color: #d8def0;
    box-shadow: 0px 10px 34px -12px rgba(49, 55, 253, 0.22);
}

.simco-faq__q {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
    color: #16213e;
    cursor: pointer;
    list-style: none;
    padding: 18px 60px 18px 22px;
    position: relative;
    user-select: none;
    transition: color .2s ease, background .2s ease;
}

.simco-faq__q:hover {
    background: #f6f8fc;
}

/* Ascundem marcajul implicit al <summary> */
.simco-faq__q::-webkit-details-marker { display: none; }
.simco-faq__q::marker { content: ''; }

/* Indicator +/× într-o pastilă albastră, la dreapta */
.simco-faq__q::after {
    content: '+';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    font-size: 22px;
    font-weight: 400;
    color: #3137fd;
    background: #eef1ff;
    border-radius: 50%;
    transition: transform .25s ease, background .2s ease, color .2s ease;
}

.simco-faq__item[open] .simco-faq__q {
    color: #3137fd;
}

.simco-faq__item[open] .simco-faq__q::after {
    content: '+';
    transform: translateY(-50%) rotate(45deg);  /* + devine × */
    background: #3137fd;
    color: #fff;
}

.simco-faq__a {
    padding: 2px 22px 20px;
    color: #444;
    line-height: 1.75;
    font-size: 15.5px;
    border-top: 1px solid #f0f2f7;
}

.simco-faq__a p { margin: 14px 0 0; }

@media (max-width: 767px) {
    .simco-faq__title { font-size: 22px; }
    .simco-faq__q { font-size: 16px; padding: 16px 52px 16px 18px; }
    .simco-faq__a { padding: 2px 18px 18px; }
}

/* ============================================================================
 *  6. TAGLINE ROTATIV SUB LOGO (animație CSS, fără JS)
 *  Mesaje de încredere care se schimbă lin (fade). Culoare pentru header închis.
 * -------------------------------------------------------------------------- */
.simco-tagline {
    position: relative;
    height: 15px;
    margin: 6px 0 2px;
    max-width: 250px;
    pointer-events: none;
}

.simco-tagline span {
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #b9c4ff;            /* albastru deschis de brand, pe header închis */
    white-space: nowrap;
    opacity: 0;
    animation: simcoTagline 14s infinite;
}

.simco-tagline span:nth-child(1) { animation-delay: 0s; }
.simco-tagline span:nth-child(2) { animation-delay: 3.5s; }
.simco-tagline span:nth-child(3) { animation-delay: 7s; }
.simco-tagline span:nth-child(4) { animation-delay: 10.5s; }

@keyframes simcoTagline {
    0%   { opacity: 0; transform: translateY(3px); }
    3%   { opacity: 1; transform: translateY(0); }
    21%  { opacity: 1; transform: translateY(0); }
    25%  { opacity: 0; transform: translateY(-3px); }
    100% { opacity: 0; }
}

/* Ascuns doar pe header-ul micșorat (sticky), la derulare — logo-ul trebuie să respire */
.sticky .simco-tagline { display: none; }

/* Accesibilitate: dacă utilizatorul preferă mișcare redusă, arătăm doar primul mesaj */
@media (prefers-reduced-motion: reduce) {
    .simco-tagline span { animation: none; }
    .simco-tagline span:nth-child(1) { opacity: 1; }
    .simco-tagline span:nth-child(n+2) { display: none; }
}

/* ============================================================================
 *  7. FORMULAR „CERE OFERTĂ" ([simco_oferta]) — card alb, în tonul temei
 * -------------------------------------------------------------------------- */
.simco-quote {
    background: #fff;
    border-radius: 12px;
    padding: 26px 24px;
    box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .45);
    max-width: 420px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.simco-quote__title {
    font-size: 22px;
    font-weight: 700;
    color: #16213e;
    margin: 0 0 4px;
}

.simco-quote__sub {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
    line-height: 1.5;
}

.simco-quote__form input,
.simco-quote__form select,
.simco-quote__form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    margin-bottom: 10px;
    border: 1px solid #dfe3ea;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #16213e;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.simco-quote__form input::placeholder,
.simco-quote__form textarea::placeholder { color: #9aa1ad; }

.simco-quote__form input:focus,
.simco-quote__form select:focus,
.simco-quote__form textarea:focus {
    outline: none;
    border-color: #3137fd;
    box-shadow: 0 0 0 3px rgba(49, 55, 253, .12);
}

.simco-quote__form textarea { resize: vertical; min-height: 70px; }

.simco-quote__row {
    display: flex;
    gap: 10px;
}
.simco-quote__row input { flex: 1; }

.simco-quote__btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 13px 18px;
    background: #3137fd;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}
.simco-quote__btn:hover { background: #1f25c9; }
.simco-quote__btn:active { transform: scale(.99); }

.simco-quote__note {
    font-size: 11px;
    color: #9aa1ad;
    margin: 10px 0 0;
    line-height: 1.4;
}

.simco-quote__msg {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.5;
}
.simco-quote__msg--ok  { background: #e7f6ed; color: #1d7a44; border: 1px solid #b8e6c8; }
.simco-quote__msg--err { background: #fdeaea; color: #b3261e; border: 1px solid #f2c2c0; }

/* Honeypot — ascuns de utilizatori, vizibil pentru boți */
.simco-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px; overflow: hidden;
}

@media (max-width: 480px) {
    .simco-quote { max-width: 100%; padding: 22px 18px; }
    .simco-quote__row { flex-direction: column; gap: 0; }
}

/* ============================================================================
 *  8. HERO cu 2 coloane (text stânga + formular dreapta)
 *  Adaugă clasa „simco-hero" pe RÂNDUL (row) hero-ului în WPBakery.
 *  Forțează coloanele una lângă alta pe desktop; pe mobil se stivuiesc.
 * -------------------------------------------------------------------------- */
@media (min-width: 992px) {
    .simco-hero.vc_row,
    .simco-hero.wpb_row,
    .simco-hero > .wpb_row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }
    .simco-hero > .vc_column_container,
    .simco-hero > .wpb_column {
        float: none !important;
    }
    /* formularul aliniat sus-dreapta în coloana lui */
    .simco-hero .simco-quote {
        margin-left: auto;
    }
}

/* ============================================================================
 *  9. BUTON FLOTANT „CERE OFERTĂ" + POPUP (modal)
 * -------------------------------------------------------------------------- */
.simco-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3137fd;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 14px 22px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 26px -8px rgba(49, 55, 253, .6);
    transition: background .2s ease, transform .12s ease;
}
.simco-fab:hover { background: #1f25c9; color: #fff; }
.simco-fab:active { transform: scale(.97); }
.simco-fab svg { width: 18px; height: 18px; }

/* Buton inline (shortcode [simco_oferta_buton]) */
.simco-quote-trigger {
    display: inline-flex;
    align-items: center;
    background: #3137fd;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}
.simco-quote-trigger:hover { background: #1f25c9; color: #fff; }

/* Popup */
.simco-oferta-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.simco-oferta-modal.is-open { display: flex; }
.simco-oferta-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 23, 40, .55);
    backdrop-filter: blur(2px);
}
.simco-oferta-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    z-index: 1;
    animation: simcoModalIn .22s ease;
}
@keyframes simcoModalIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.simco-oferta-modal .simco-quote {
    margin: 0;
    max-width: 100%;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .5);
}
.simco-oferta-close {
    position: absolute;
    right: -10px;
    top: -10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #16213e;
    color: #fff;
    font-size: 20px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.simco-oferta-close:hover { background: #000; }

/* Blocăm scroll-ul paginii când popup-ul e deschis */
body.simco-modal-lock { overflow: hidden; }

@media (max-width: 480px) {
    .simco-fab { padding: 12px 18px; font-size: 14px; right: 14px; bottom: 14px; }
    .simco-oferta-close { right: 4px; top: -42px; background: #fff; color: #16213e; }
}
