/**
 * Каталог сертификации в стилистике Реестр Гарант (новый дизайн).
 * Подключается вместе с news-theme-new.css.
 */

/* --- Обёртка --- */
body.cert-theme-new {
    background: #f7f3ee;
    color: #1c1814;
    font-family: 'DM Sans', sans-serif;
}
body.cert-theme-new .cert-main { padding-bottom: 80px; }

/* --- Хлебные крошки --- */
.cert-breadcrumbs {
    margin-top: 76px;
    background: #ede7de;
    padding: 14px 0;
    border-bottom: 1px solid #ddd5c8;
}
.cert-breadcrumbs-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 64px;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: #6b6055;
}
.cert-breadcrumbs a { color: #b07d2e; text-decoration: none; }
.cert-breadcrumbs a:hover { color: #1c1814; }

/* --- SEO-блок под карточками --- */
.cert-seo-block {
    margin-top: 56px;
    padding: 48px 0;
    background: linear-gradient(180deg, #ede7de 0%, #f7f3ee 100%);
    border-top: 1px solid #ddd5c8;
    border-bottom: 1px solid #ddd5c8;
}
.cert-seo-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}
.cert-seo-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(26px, 3.5vw, 34px);
    font-weight: 400;
    color: #1c1814;
    margin: 0 0 24px 0;
    line-height: 1.25;
}
.cert-seo-content p {
    font-size: 15px;
    line-height: 1.75;
    color: #1c1814;
    margin: 0 0 18px 0;
}
.cert-seo-content p:last-of-type { margin-bottom: 28px; }
.cert-seo-content a {
    color: #b07d2e;
    text-decoration: none;
    font-weight: 500;
}
.cert-seo-content a:hover { text-decoration: underline; }
.cert-seo-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}
.cert-seo-highlight {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 20px;
    background: #f7f3ee;
    border: 1px solid #ddd5c8;
    min-height: 0;
}
.cert-seo-hl-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}
.cert-seo-hl-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cert-seo-hl-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #b07d2e;
    line-height: 1.3;
    margin: 0;
}
.cert-seo-hl-desc {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: #1c1814;
    margin: 0;
}
@media (max-width: 700px) {
    .cert-seo-highlights { grid-template-columns: 1fr; }
}

/* --- Выбор города (перенесён вниз) --- */
.cert-city-section {
    background: #f7f3ee;
    padding: 32px 64px 24px;
    border-bottom: 1px solid #ddd5c8;
}
.cert-city-inner { max-width: 1200px; margin: 0 auto; }
.cert-section-tag {
    font-size: 10px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #b07d2e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.cert-section-tag-line { width: 36px; height: 1px; background: #b07d2e; }
.cert-city-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 400;
    color: #1c1814;
    margin-bottom: 20px;
}
.cert-city-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cert-city-chip {
    display: inline-block;
    padding: 8px 18px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: #6b6055;
    background: #ede7de;
    border: 1px solid #ddd5c8;
    transition: all 0.2s;
}
.cert-city-chip:hover {
    color: #b07d2e;
    border-color: #b07d2e;
}
.cert-city-chip.active {
    background: #1c1814;
    color: #f7f3ee;
    border-color: #1c1814;
}
.cert-city-section-bottom {
    margin-top: 0;
    padding: 40px 64px 48px;
    border-bottom: none;
}

/* --- Hero каталога --- */
.cert-hero {
    background: #ede7de;
    padding: 56px 64px;
    border-bottom: 1px solid #ddd5c8;
}
.cert-hero-inner { max-width: 1200px; margin: 0 auto; }
.cert-hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 300;
    line-height: 1.15;
    color: #1c1814;
    margin-bottom: 16px;
}
.cert-hero h1 em { font-style: italic; color: #b07d2e; }
.cert-hero-subtitle {
    font-size: 15px;
    line-height: 1.7;
    color: #6b6055;
    max-width: 640px;
}

/* --- Контейнер --- */
.cert-container { max-width: 1200px; margin: 0 auto; padding: 0 64px; }

/* --- Статистика --- */
.cert-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #ddd5c8;
    margin: 40px 0 32px;
}
.cert-stat-card {
    background: #f7f3ee;
    padding: 28px 24px;
    text-align: center;
}
.cert-stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #b07d2e;
    display: block;
    margin-bottom: 6px;
}
.cert-stat-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6b6055;
}

/* --- Фильтры --- */
.cert-filters {
    background: #ede7de;
    padding: 28px 36px;
    margin-bottom: 32px;
    border: 1px solid #ddd5c8;
}
.cert-filters form { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
.cert-filters label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6b6055;
    margin-bottom: 8px;
}
.cert-search-input,
.cert-category-select {
    padding: 12px 16px;
    border: 1px solid #ddd5c8;
    background: #f7f3ee;
    font-size: 14px;
    color: #1c1814;
    min-width: 220px;
}
.cert-search-input:focus,
.cert-category-select:focus {
    outline: none;
    border-color: #b07d2e;
}
.cert-filter-btn {
    padding: 12px 28px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: #b07d2e;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.cert-filter-btn:hover { background: #1c1814; }

/* --- Результаты поиска (подсказка) --- */
.cert-search-hint {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #ede7de;
    border-left: 4px solid #b07d2e;
    font-size: 14px;
    color: #1c1814;
}
.cert-search-hint a { color: #b07d2e; text-decoration: none; }
.cert-search-hint a:hover { text-decoration: underline; }

/* --- Сетка карточек услуг: ровная, симметричная, как в /news/ --- */
.cert-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}
.cert-service-card {
    background: #f7f3ee;
    border: 1px solid #ddd5c8;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: none;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.18s ease;
}
.cert-service-card:hover {
    background: #ede7de;
    border-color: #d0c8bc;
    transform: translateY(-2px);
}
.cert-service-header {
    padding: 22px 24px 14px;
    border-bottom: 1px solid #ede7de;
}
.cert-service-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 6px 0;
    line-height: 1.25;
}
.cert-service-title a {
    color: #1c1814;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    min-height: 2.6em; /* резерв под две строки, даже если заголовок короткий */
}
.cert-service-title a:hover { color: #b07d2e; }
.cert-service-type {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6b6055;
    margin: 0;
}
.cert-service-body {
    padding: 18px 24px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.cert-service-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain;
    background: #ede7de;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 6px;
}
.cert-service-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #6b6055;
    margin: 0 0 18px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cert-service-params {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.cert-service-param {
    background: #ede7de;
    padding: 11px 13px;
    border-left: 3px solid #b07d2e;
}
.cert-param-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b6055;
    margin-bottom: 4px;
}
.cert-param-value {
    font-size: 13px;
    font-weight: 500;
    color: #1c1814;
}
.cert-service-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #ede7de;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.cert-service-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #b07d2e;
}
.cert-service-btn {
    display: inline-block;
    padding: 10px 22px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: #1c1814;
    color: #f7f3ee;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.cert-service-btn:hover {
    background: #b07d2e;
}

/* --- Пустое состояние --- */
.cert-empty {
    text-align: center;
    padding: 64px 24px;
    background: #ede7de;
    border: 1px solid #ddd5c8;
    margin-top: 32px;
}
.cert-empty-icon { font-size: 3rem; margin-bottom: 20px; opacity: 0.6; }
.cert-empty-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    color: #1c1814;
    margin-bottom: 12px;
}
.cert-empty-text { color: #6b6055; margin-bottom: 24px; }
.cert-empty a { color: #b07d2e; text-decoration: none; }
.cert-empty a:hover { text-decoration: underline; }

/* --- Пагинация --- */
.cert-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 48px;
}
.cert-pagination a {
    padding: 10px 18px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #ddd5c8;
    background: #f7f3ee;
    color: #1c1814;
}
.cert-pagination a:hover,
.cert-pagination a.active {
    background: #1c1814;
    color: #f7f3ee;
    border-color: #1c1814;
}

@media (max-width: 900px) {
    .cert-city-section, .cert-city-section-bottom, .cert-hero { padding-left: 24px; padding-right: 24px; }
    .cert-city-section-bottom { padding: 32px 24px 40px; }
    .cert-container { padding: 0 24px; }
    .cert-stats { grid-template-columns: repeat(2, 1fr); }
    .cert-services-grid { grid-template-columns: 1fr; }
    .cert-service-params { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .cert-stats { grid-template-columns: 1fr; }
    .cert-filters form { flex-direction: column; align-items: stretch; }
    .cert-search-input, .cert-category-select { min-width: 0; }
}

/* --- Страница одной услуги (document-page) --- */
body.cert-theme-new .cert-main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
    padding: 32px 0 64px;
}
body.cert-theme-new .cert-page-header {
    margin-bottom: 32px;
}
body.cert-theme-new .cert-page-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 300;
    line-height: 1.2;
    color: #1c1814;
    margin: 0 0 8px 0;
}
body.cert-theme-new .cert-page-subtitle {
    font-size: 14px;
    letter-spacing: 0.05em;
    color: #6b6055;
    margin: 0;
}
body.cert-theme-new .cert-top-section {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding: 32px 0;
    border-top: 1px solid #ddd5c8;
    border-bottom: 1px solid #ddd5c8;
}

/* --- Фото документа (образец) --- */
body.cert-theme-new .cert-document-photo {
    position: relative;
}
body.cert-theme-new .cert-document-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    min-height: 180px;
    max-height: 360px;
    object-fit: contain;
    object-position: top center;
    border-radius: 12px;
    border: 1px solid #ddd5c8;
    box-shadow: 0 8px 24px rgba(28, 24, 20, 0.12);
    background: #f7f3ee;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
body.cert-theme-new .cert-document-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(28, 24, 20, 0.18);
}
body.cert-theme-new .cert-document-caption {
    margin-top: 12px;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: #6b6055;
    text-align: center;
}
body.cert-theme-new .cert-document-caption small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.85;
}

/* --- Картинки внутри контента статьи --- */
body.cert-theme-new .cert-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #ddd5c8;
    box-shadow: 0 4px 16px rgba(28, 24, 20, 0.08);
    margin: 20px 0;
    display: block;
}
body.cert-theme-new .cert-content img[style*="float"] {
    margin: 0 20px 16px 0;
}
body.cert-theme-new .cert-content img[style*="float: right"] {
    margin: 0 0 16px 20px;
}
body.cert-theme-new .cert-content figure {
    margin: 24px 0;
}
body.cert-theme-new .cert-content figure img {
    margin: 0;
}
body.cert-theme-new .cert-content figcaption {
    font-size: 13px;
    color: #6b6055;
    margin-top: 10px;
    text-align: center;
}
body.cert-theme-new .cert-price-section {
    background: #ede7de;
    border: 1px solid #ddd5c8;
    padding: 24px;
    margin-bottom: 24px;
}
body.cert-theme-new .cert-price-badge { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: #6b6055; margin-bottom: 12px; }
body.cert-theme-new .cert-price-current { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 600; color: #b07d2e; }
body.cert-theme-new .cert-price-current.cert-price-sub,
.cert-service-price.cert-price-sub { font-size: 1.25rem; color: #6b6055; font-weight: 500; }
body.cert-theme-new .cert-price-old { text-decoration: line-through; color: #9a9088; font-size: 14px; margin-bottom: 4px; }
body.cert-theme-new .cert-params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
body.cert-theme-new .cert-param-item { background: #f7f3ee; padding: 14px; border-left: 3px solid #b07d2e; }
body.cert-theme-new .cert-param-title { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: #6b6055; margin-bottom: 4px; }
body.cert-theme-new .cert-param-value { font-size: 14px; font-weight: 500; color: #1c1814; }
body.cert-theme-new .cert-article-content .cert-content,
body.cert-theme-new .cert-content {
    font-size: 15px; line-height: 1.8; color: #1c1814;
}
body.cert-theme-new .cert-content a { color: #b07d2e; text-decoration: none; }
body.cert-theme-new .cert-content a:hover { text-decoration: underline; }
body.cert-theme-new .cert-order-card {
    background: #ede7de;
    border: 1px solid #ddd5c8;
    padding: 28px;
    position: sticky;
    top: 100px;
    box-sizing: border-box;
}
body.cert-theme-new .cert-order-card input,
body.cert-theme-new .cert-order-card textarea {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
body.cert-theme-new .cert-order-header {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    color: #1c1814;
    margin-bottom: 20px;
}
body.cert-theme-new .cert-order-card form {
    display: block;
    width: 100%;
    box-sizing: border-box;
}
body.cert-theme-new .cert-form-group {
    margin-bottom: 18px;
    width: 100%;
    box-sizing: border-box;
}
body.cert-theme-new .cert-form-group label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b6055;
    margin: 0 0 6px 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}
body.cert-theme-new .cert-form-group input,
body.cert-theme-new .cert-form-group textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #ddd5c8;
    background: #f7f3ee;
    font-size: 14px;
    color: #1c1814;
    font-family: inherit;
    box-sizing: border-box;
    border-radius: 6px;
}
body.cert-theme-new .cert-form-group textarea {
    resize: vertical;
    min-height: 80px;
}
body.cert-theme-new .cert-btn-order {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 14px 24px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: #b07d2e;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    box-sizing: border-box;
    border-radius: 6px;
}
body.cert-theme-new .cert-btn-order:hover { background: #1c1814; }
body.cert-theme-new .cert-contact-card { margin-top: 24px; padding-top: 24px; border-top: 1px solid #ddd5c8; }
body.cert-theme-new .cert-contact-item { margin-bottom: 12px; font-size: 14px; }
body.cert-theme-new .cert-contact-link { color: #b07d2e; text-decoration: none; }
body.cert-theme-new .cert-features-section { padding: 48px 0; border-top: 1px solid #ddd5c8; }
body.cert-theme-new .cert-features-title { font-family: 'Cormorant Garamond', serif; font-size: 28px; color: #1c1814; margin-bottom: 28px; }
body.cert-theme-new .cert-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
body.cert-theme-new .cert-feature-item { background: #ede7de; padding: 24px; border: 1px solid #ddd5c8; }
body.cert-theme-new .cert-feature-item strong { color: #1c1814; }
body.cert-theme-new .cert-feature-item p { font-size: 13px; color: #6b6055; margin: 8px 0 0 0; }
@media (max-width: 900px) {
    body.cert-theme-new .cert-main-layout { grid-template-columns: 1fr; }
    body.cert-theme-new .cert-top-section { grid-template-columns: 1fr; }
    body.cert-theme-new .cert-top-section .cert-document-photo {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    body.cert-theme-new .cert-document-image {
        max-width: 100%;
    }
    body.cert-theme-new .cert-content img {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    body.cert-theme-new .cert-features-grid { grid-template-columns: 1fr; }
}
