/* responsive.css — citadel-expert.ru */

*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }

/* ─── Боковые декоративные колонки — всегда скрыты ─── */
td.ce-side,
td.ce-side-spacer,
td.ce-hero-side {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

/* ─── ДЕСКТОП: центрируем в 727px ─── */
@media screen and (min-width: 681px) {
    table.ce-outer {
        width: 727px !important;
        margin: 0 auto !important;
    }
    td.ce-hero-img img {
        width: 727px;
        max-width: 100%;
        display: block;
    }
    td.ce-header-nav { width: 727px !important; }
}

/* ─── МОБИЛЬНЫЙ (≤680px) ─── */
@media screen and (max-width: 680px) {
    body { overflow-x: hidden; }

    table.ce-outer,
    table.ce-outer tbody {
        display: block !important;
        width: 100% !important;
    }
    table.ce-outer tr {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }
    td.ce-header-nav {
        display: block !important;
        width: 100% !important;
        padding: 5px !important;
    }
    td.ce-hero-img { display: none !important; }

    table.ce-inner,
    table.ce-inner tbody {
        display: block !important;
        width: 100% !important;
    }
    table.ce-inner tr {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    td.ce-sidebar {
        order: 1 !important;
        width: 100% !important;
        padding: 8px 12px !important;
        border-bottom: 2px solid #e1e1e1 !important;
    }
    td.ce-divider { display: none !important; }
    td.ce-main {
        order: 2 !important;
        width: 100% !important;
        padding: 8px 12px !important;
    }
    td, body { font-size: 14px !important; }
    h1 { font-size: 17px !important; }
    h2 { font-size: 15px !important; }
}

@media screen and (max-width: 380px) {
    td, body { font-size: 15px !important; }
}

/* ─── Скрываем hero-строку целиком на мобильном ─── */
@media screen and (max-width: 680px) {
    tr.ce-hero-row {
        display: none !important;
    }
}

/* ─── Скрываем hero через height и visibility ─── */
@media screen and (max-width: 680px) {
    tr.ce-hero-row,
    tr.ce-hero-row td {
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        border: 0 !important;
        visibility: hidden;
        font-size: 0 !important;
        line-height: 0 !important;
    }
    tr.ce-hero-row td img {
        display: none !important;
    }
    td.ce-hero-side {
        display: none !important;
        height: 0 !important;
    }
    td.ce-hero-img {
        display: none !important;
        height: 0 !important;
    }
}

/* ─── МОБИЛЬНЫЙ: точечные фиксы ─── */
@media screen and (max-width: 680px) {

    /* Hero-строка: скрываем через position вместо display */
    table.ce-outer tbody tr.ce-hero-row {
        position: absolute !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }

    /* Спейсеры s.gif — ограничиваем высоту */
    img[src*="s.gif"] {
        height: 1px !important;
        max-height: 1px !important;
        display: block !important;
    }

    /* Строки-спейсеры с height:1px */
    table.ce-outer tr[style*="height:1px"],
    table.ce-outer tr[style*="height: 1px"] {
        max-height: 2px !important;
        overflow: hidden !important;
    }

    /* Фоновый паттерн ce-hero-side убираем */
    td.ce-hero-side {
        background: none !important;
        background-image: none !important;
    }
}

/* ─── Скрываем картиночное меню на мобильном ─── */
@media screen and (max-width: 680px) {
    tr.ce-nav-row,
    tr.ce-nav-row td {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
    }
}
