/* ==========================================================================
   H5 ئىجارىچى سۇپىسى ئۇسلۇبى / Tenant H5 template styles
   ========================================================================== */
:root {
    --h5-primary: #b8860b;
    --h5-bg: #f7f5f2;
    --h5-card: #ffffff;
    --h5-text: #23201d;
    --h5-muted: #8b8377;
    --h5-line: #ece7e0;
    --h5-radius: 14px;
    --h5-shadow: 0 2px 12px rgba(35, 32, 29, .06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body.h5-body {
    background: var(--h5-bg);
    color: var(--h5-text);
    font-size: 15px;
    line-height: 1.65;
    font-family: -apple-system, BlinkMacSystemFont, 'UKIJ Ekran', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 64px;
}

body.font-serif { font-family: Georgia, "Times New Roman", "UKIJ Ekran", serif; }
body.font-sans { font-family: "UKIJ Ekran", "Helvetica Neue", Arial, sans-serif; }

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* ---------- Flash ---------- */
.h5-flash {
    padding: 10px 16px;
    font-size: 14px;
    text-align: center;
}
.h5-flash-error { background: #fdecea; color: #b3261e; }
.h5-flash-success { background: #e8f5e9; color: #1b5e20; }

/* ---------- Topbar ---------- */
.h5-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--h5-line);
}
.h5-topbar-inner {
    max-width: 720px;
    margin: 0 auto;
    height: 52px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.h5-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    min-width: 0;
}
.h5-brand img { height: 36px; width: auto; max-width: 140px; border-radius: 6px; object-fit: contain; }
.h5-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h5-topbar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.h5-icon-btn { font-size: 13px; color: var(--h5-muted); }

.h5-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0 20px;
}

/* ---------- Slider ---------- */
.h5-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
}
.h5-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}
.h5-slide img,
.h5-slide video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #ddd;
}

/* ---------- Hero ---------- */
.h5-hero {
    padding: 22px 16px 6px;
    text-align: center;
}
.h5-hero h1 {
    margin: 0 0 6px;
    font-size: 22px;
    letter-spacing: 1px;
}
.h5-slogan {
    margin: 0 0 14px;
    color: var(--h5-muted);
    font-size: 14px;
}

/* ---------- Chips ---------- */
.h5-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 14px;
    -webkit-overflow-scrolling: touch;
}
.h5-chips::-webkit-scrollbar { display: none; }
.h5-chips-sub { padding-top: 0; }
.h5-chip {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--h5-card);
    border: 1px solid var(--h5-line);
    font-size: 13px;
    color: var(--h5-muted);
    white-space: nowrap;
}
.h5-chip.active {
    background: var(--h5-primary);
    border-color: var(--h5-primary);
    color: #fff;
}

/* ---------- Section ---------- */
.h5-section { padding: 14px; }
.h5-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}
.h5-section-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}
.h5-more { font-size: 13px; color: var(--h5-muted); }
.h5-empty { text-align: center; color: var(--h5-muted); padding: 30px 0; }

/* ---------- Work grid ---------- */
.h5-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
body.layout-waterfall .h5-works {
    display: block;
    columns: 3;
    column-gap: 10px;
}
body.layout-waterfall .h5-work-card {
    display: inline-block;
    width: 100%;
    margin-bottom: 10px;
    break-inside: avoid;
}
.h5-work-card {
    background: var(--h5-card);
    border-radius: var(--h5-radius);
    overflow: hidden;
    box-shadow: var(--h5-shadow);
}
.h5-work-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #efeae3;
}
.h5-work-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.h5-work-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #b9b1a5;
}
.h5-work-title {
    padding: 8px 10px 2px;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.h5-work-meta {
    padding: 0 10px 10px;
    font-size: 12px;
    color: var(--h5-muted);
}

/* ---------- Jobs ---------- */
.h5-job-list { list-style: none; margin: 0; padding: 0; }
.h5-job-list li {
    background: var(--h5-card);
    border-radius: var(--h5-radius);
    box-shadow: var(--h5-shadow);
    margin-bottom: 10px;
}
.h5-job-list a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
}
.h5-job-list span { font-size: 15px; font-weight: 500; }
.h5-job-list small { color: var(--h5-muted); font-size: 12px; }

/* ---------- Buttons ---------- */
.h5-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity .2s, background .2s;
}
.h5-btn-primary { background: var(--h5-primary); color: #fff; }
.h5-btn-ghost {
    background: var(--h5-card);
    border-color: var(--h5-line);
    color: var(--h5-text);
}
.h5-btn-ghost.is-active { border-color: var(--h5-primary); color: var(--h5-primary); }
.h5-btn-block { width: 100%; }
.h5-btn-sm { padding: 6px 14px; font-size: 13px; }
.h5-btn:active { opacity: .8; }

/* ---------- CTA ---------- */
.h5-cta {
    padding: 18px 14px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
.h5-cta p { margin: 0; color: var(--h5-muted); font-size: 14px; }

/* ---------- Detail ---------- */
.h5-detail { padding: 16px 14px; }
.h5-detail-title { margin: 0 0 8px; font-size: 20px; }
.h5-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--h5-muted);
    margin-bottom: 14px;
}
.h5-detail-block { margin-bottom: 18px; }
.h5-detail-block h3 { font-size: 15px; margin: 0 0 6px; }
.h5-detail-desc { font-size: 14px; color: #4a443c; white-space: pre-wrap; }
.h5-gallery { display: flex; flex-direction: column; gap: 8px; }
.h5-gallery img,
.h5-gallery video {
    width: 100%;
    border-radius: var(--h5-radius);
    background: #efeae3;
}
.h5-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.h5-tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f2ede6;
    color: var(--h5-muted);
}
.h5-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.h5-actions-center { justify-content: center; }

/* ---------- Info list ---------- */
.h5-info-list { list-style: none; margin: 0; padding: 0; }
.h5-info-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--h5-line);
    font-size: 14px;
}
.h5-info-list li span { color: var(--h5-muted); flex-shrink: 0; }
.h5-info-list li b { font-weight: 500; text-align: end; }

.h5-qr { text-align: center; padding: 18px 0 0; }
.h5-qr img { width: 160px; margin: 0 auto 6px; border-radius: 10px; }
.h5-qr p { margin: 0; font-size: 13px; color: var(--h5-muted); }

/* ---------- Team ---------- */
.h5-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.h5-team-card {
    background: var(--h5-card);
    border-radius: var(--h5-radius);
    box-shadow: var(--h5-shadow);
    padding: 14px;
    text-align: center;
}
.h5-team-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
}
.h5-team-ph {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #efeae3;
    color: #b9b1a5;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}
.h5-team-name { font-size: 15px; font-weight: 500; }
.h5-team-role { font-size: 12px; color: var(--h5-primary); }
.h5-team-bio { font-size: 12px; color: var(--h5-muted); margin-top: 6px; }

/* ---------- Form ---------- */
.h5-form {
    background: var(--h5-card);
    border-radius: var(--h5-radius);
    box-shadow: var(--h5-shadow);
    padding: 16px;
    margin: 0 14px;
}
.h5-field { margin-bottom: 14px; }
.h5-field label {
    display: block;
    font-size: 13px;
    color: var(--h5-muted);
    margin-bottom: 6px;
}
.h5-field input,
.h5-field select,
.h5-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--h5-line);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: inherit;
}
.h5-field input:focus,
.h5-field select:focus,
.h5-field textarea:focus {
    outline: none;
    border-color: var(--h5-primary);
}
.h5-error { color: #b3261e; font-size: 12px; display: block; margin-top: 4px; }
.h5-notice {
    margin: 0 14px 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fdf6e3;
    font-size: 13px;
}

/* ---------- Success ---------- */
.h5-success { text-align: center; padding: 40px 16px; }
.h5-success-icon {
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 32px;
    margin: 0 auto 14px;
}
.h5-success h2 { margin: 0 0 6px; font-size: 18px; }
.h5-success p { margin: 0 0 20px; color: var(--h5-muted); font-size: 14px; }

/* ---------- Profile ---------- */
.h5-profile { text-align: center; padding: 26px 16px 10px; }
.h5-avatar {
    width: 62px;
    height: 62px;
    line-height: 62px;
    border-radius: 50%;
    background: var(--h5-primary);
    color: #fff;
    font-size: 26px;
    margin: 0 auto 10px;
}
.h5-profile-name { font-size: 17px; font-weight: 600; }
.h5-profile-sub { font-size: 13px; color: var(--h5-muted); margin-bottom: 12px; }

.h5-record-list { list-style: none; margin: 0; padding: 0; }
.h5-record-list li {
    background: var(--h5-card);
    border-radius: var(--h5-radius);
    box-shadow: var(--h5-shadow);
    padding: 12px 14px;
    margin-bottom: 10px;
}
.h5-record-title { font-size: 15px; font-weight: 500; }
.h5-record-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--h5-muted);
    margin-top: 4px;
}
.h5-record-msg { font-size: 13px; color: #4a443c; margin-top: 6px; }
.h5-badge {
    background: #f2ede6;
    border-radius: 999px;
    padding: 2px 10px;
    color: var(--h5-primary);
}

/* ---------- Pager ---------- */
.h5-pager { padding: 6px 14px 20px; }
.h5-pager .pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.h5-pager .page {
    min-width: 32px;
    padding: 5px 10px;
    text-align: center;
    border-radius: 8px;
    background: var(--h5-card);
    border: 1px solid var(--h5-line);
    font-size: 13px;
}
.h5-pager .current {
    background: var(--h5-primary);
    border-color: var(--h5-primary);
    color: #fff;
}

/* ---------- State page ---------- */
.h5-state-page {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    gap: 8px;
}
.h5-state-icon { font-size: 46px; }
.h5-state-page h1 { font-size: 19px; margin: 0; }
.h5-state-page p { color: var(--h5-muted); margin: 0; }
.h5-state-sub { font-size: 13px; }

/* ---------- Tabbar ---------- */
.h5-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    border-top: 1px solid var(--h5-line);
}
.h5-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 0;
    font-size: 11px;
    color: var(--h5-muted);
}
.h5-tab-icon { font-size: 18px; line-height: 1; }
.h5-tab.active { color: var(--h5-primary); }

@media (min-width: 720px) {
    .h5-works { grid-template-columns: repeat(3, 1fr); }
    .h5-team { grid-template-columns: repeat(4, 1fr); }
}

/* ===== FontAwesome 图标对齐优化 (2026-08-30) ===== */
.h5-tab-icon i.fas, .h5-tab-icon i.far, .h5-tab-icon i.fab { line-height: 1; display: block; }
.h5-work-meta i.fas { font-size: 0.85em; vertical-align: -1px; margin: 0 3px; }

/* Video cover fallback */
.h5-work-cover-video {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.h5-work-cover-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}
.h5-work-play-icon {
    position: absolute;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    pointer-events: none;
}
.h5-work-play-icon i {
    color: #7c3aed;
    font-size: 16px;
    margin-left: 3px;
}

.h5-btn i.fas, .h5-btn-ghost i.fas { margin-right: 6px; }

/* ========== 轮播图增强 / Carousel (enhanced) ========== */
.h5-slider {
    position: relative;
    overflow: hidden;
    margin: 12px 12px 0;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    background: var(--h5-card, #f5f5f5);
    scroll-snap-type: none;
    display: block;
}
.h5-slider-track {
    display: flex;
    will-change: transform;
    transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}
.h5-slider .h5-slide {
    flex: 0 0 100%;
    position: relative;
    scroll-snap-align: unset;
}
.h5-slider .h5-slide img,
.h5-slider .h5-slide video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #e8e8e8;
}
.h5-slide-caption {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    padding: 26px 16px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: start;
    pointer-events: none;
}
.h5-slider-dots {
    position: absolute;
    bottom: 10px;
    inset-inline: 0;
    display: flex;
    justify-content: center;
    gap: 7px;
    z-index: 2;
}
.h5-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    transition: all .3s ease;
    cursor: pointer;
}
.h5-dot.active {
    width: 18px;
    background: var(--h5-primary, #b8860b);
}

/* ========== 业务介绍卡片 / Business intro card ========== */
.h5-intro-card {
    background: var(--h5-card, #fff);
    border-radius: 16px;
    margin: 16px 12px 0;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}
.h5-intro-text {
    margin: 0 0 12px;
    color: var(--h5-text, #333);
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-line;
}
.h5-intro-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 12px 0 0;
    border-top: 1px dashed var(--h5-line, #eee);
    list-style: none;
}
.h5-intro-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--h5-muted, #777);
}
.h5-intro-meta i {
    color: var(--h5-primary, #b8860b);
    width: 16px;
    text-align: center;
}


/* ===== 媒体保护样式 / Media protection ===== */
.h5-protected-video, .h5-gallery video, .h5-slider video {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    outline: none;
}
.h5-gallery img, .h5-slider img, .h5-work-cover img {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}
video::-internal-media-controls-download-button { display: none; }
video::-webkit-media-controls-enclosure { overflow: hidden; }

/* ---------- مۇلازىمەت تۈرلىرى / Services ---------- */
.h5-service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.h5-service-card {
    background: #fff; border-radius: 12px; padding: 14px 8px; text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,.06); display: flex; flex-direction: column;
    align-items: center; gap: 6px; transition: transform .2s ease;
}
.h5-service-card:active { transform: scale(.96); }
.h5-service-icon {
    width: 46px; height: 46px; border-radius: 50%; font-size: 18px; color: var(--h5-primary);
    background: rgba(184,134,11,.1); display: flex; align-items: center; justify-content: center;
}
.h5-service-name { font-size: 13px; font-weight: 600; color: #333; line-height: 1.35; text-align: center; word-break: break-word; }
.h5-service-price { font-size: 15px; font-weight: 700; color: var(--h5-primary); line-height: 1.2; }
.h5-service-price small { font-size: 11px; font-weight: 400; color: #999; margin-inline-start: 2px; }
.h5-service-list { display: flex; flex-direction: column; gap: 12px; }
.h5-service-list-item {
    background: #fff; border-radius: 12px; padding: 14px; display: flex; gap: 12px;
    align-items: flex-start; box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.h5-service-info { flex: 1; min-width: 0; }
.h5-service-duration { font-size: 12px; color: var(--h5-muted); margin-top: 4px; }
.h5-service-desc { font-size: 13px; color: #666; margin: 6px 0 0; line-height: 1.5; }
.h5-service-price-box { flex: 0 0 auto; text-align: center; padding-top: 4px; }
.h5-service-price-box small { font-size: 11px; color: #999; }
.h5-detail-price { font-size: 18px; font-weight: 700; color: var(--h5-primary); }
.h5-feature-list { list-style: none; margin: 0; padding: 0; }
.h5-feature-list li {
    display: flex; align-items: flex-start; gap: 8px; padding: 8px 0;
    border-bottom: 1px dashed rgba(0,0,0,.06); font-size: 14px; color: #444; line-height: 1.5;
}
.h5-feature-list li:last-child { border-bottom: none; }
.h5-feature-list i { color: var(--h5-primary); margin-top: 3px; }
