* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f8fc;
    color: #172b4d;
    font-family: Arial, sans-serif;
}

.site-header {
    background: linear-gradient(115deg, #102247, #174a88);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(16, 34, 71, 0.16);
}

.header-inner {
    width: min(100%, 1200px);
    min-height: 76px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #ffffff;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 22px;
    font-weight: 700;
}

.brand-name {
    font-size: 25px;
    font-weight: 700;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-links a {
    min-height: 40px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 9px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease;
}

.header-links a:hover,
.header-links a:focus-visible {
    background: rgba(255, 255, 255, 0.14);
}

.header-links .primary-link {
    border-color: #ffffff;
    background: #ffffff;
    color: #174a88;
}

.header-links .primary-link:hover,
.header-links .primary-link:focus-visible {
    background: #eaf3ff;
}

.services-page-main {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 38px 24px 76px;
    flex: 1;
}

.page-heading {
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #1769c2;
    font-size: 13px;
    font-weight: 700;
}

.page-heading h1 {
    margin: 0 0 10px;
    color: #102a56;
    font-size: clamp(29px, 4vw, 40px);
    line-height: 1.35;
}

.page-description {
    max-width: 760px;
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.8;
}

.demo-notice {
    margin: 20px 0;
    padding: 13px 16px;
    border: 1px solid #c9dcf4;
    border-radius: 11px;
    background: #eef6ff;
    color: #385b83;
    font-size: 14px;
    line-height: 1.8;
}

.primary-button,
.secondary-button {
    min-height: 44px;
    padding: 11px 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #1769c2;
    border-radius: 10px;
    background: #1769c2;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, transform 150ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
    background: #1056a2;
    transform: translateY(-1px);
}

.secondary-button {
    background: #ffffff;
    color: #1769c2;
}

.secondary-button:hover,
.secondary-button:focus-visible {
    background: #eef6ff;
}

.panel {
    padding: 22px;
    border: 1px solid #e3ebf5;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 42, 86, 0.05);
}

.listing-toolbar {
    margin-bottom: 22px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: end;
    gap: 14px;
    border: 1px solid #e3ebf5;
    border-radius: 14px;
    background: #ffffff;
}

.field {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.field label {
    color: #29486f;
    font-size: 14px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #d5dfeb;
    border-radius: 9px;
    background: #ffffff;
    color: #172b4d;
    font: inherit;
    font-size: 14px;
}

.field textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.8;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
    border-color: #1769c2;
    outline: 3px solid rgba(23, 105, 194, 0.14);
}

.field input[type="number"] {
    direction: ltr;
    text-align: left;
}

.field input[type="email"] {
    direction: ltr;
    text-align: left;
}

.field input[type="file"] {
    padding: 9px;
}

.field-help {
    margin: 0;
    color: #718096;
    font-size: 12px;
    line-height: 1.7;
}

.result-summary {
    margin: 0 0 14px;
    color: #718096;
    font-size: 13px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e3ebf5;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(16, 42, 86, 0.055);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 42, 86, 0.1);
}

.service-card-image,
.service-image-placeholder {
    width: 100%;
    height: 178px;
    display: block;
    object-fit: cover;
    background: #eef6ff;
}

.service-image-placeholder {
    display: grid;
    place-items: center;
    color: #6d8eb7;
    font-size: 14px;
    font-weight: 700;
}

.service-card-content {
    padding: 18px;
}

.service-card-topline {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.category-badge,
.preview-badge {
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1769c2;
    font-size: 11px;
    font-weight: 700;
}

.preview-badge {
    background: #f1f5f9;
    color: #64748b;
}

.service-card h2 {
    margin: 0 0 8px;
    color: #17365f;
    font-size: 18px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.service-card-description {
    min-height: 48px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.service-card-provider {
    margin: 0 0 12px;
    color: #718096;
    font-size: 12px;
}

.service-card-provider a {
    color: #1769c2;
    font-weight: 700;
    text-decoration: none;
}

.service-card-provider a:hover,
.service-card-provider a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.service-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.service-price {
    color: #1056a2;
    font-size: 16px;
    font-weight: 700;
}

.empty-state {
    min-height: 160px;
    padding: 24px;
    display: grid;
    place-items: center;
    border: 1px dashed #cbd9e9;
    border-radius: 14px;
    background: #fbfdff;
    color: #718096;
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
}

.form-panel {
    max-width: 860px;
    margin: 0 auto;
}

.service-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field-wide {
    grid-column: 1 / -1;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-feedback {
    grid-column: 1 / -1;
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.8;
}

.form-feedback.error {
    border: 1px solid #f1c5c5;
    background: #fff3f3;
    color: #a12c2c;
}

.form-feedback.success {
    border: 1px solid #b9dfca;
    background: #f0fbf4;
    color: #21613b;
}

.form-feedback a {
    margin-inline-start: 5px;
    color: inherit;
    font-weight: 700;
}

.details-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 26px;
    align-items: start;
}

.details-image,
.details-image-placeholder {
    width: 100%;
    min-height: 300px;
    max-height: 480px;
    display: block;
    border-radius: 14px;
    object-fit: cover;
    background: #eef6ff;
}

.details-image-placeholder {
    display: grid;
    place-items: center;
    color: #6d8eb7;
    font-weight: 700;
}

.details-content h2 {
    margin: 0 0 12px;
    color: #102a56;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.details-description {
    margin: 20px 0;
    color: #52647d;
    font-size: 15px;
    line-height: 2;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.details-facts {
    margin: 0 0 22px;
    display: grid;
    gap: 12px;
}

.details-facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf1f7;
}

.details-facts dt {
    color: #718096;
    font-size: 13px;
}

.details-facts dd {
    margin: 0;
    color: #29486f;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    overflow-wrap: anywhere;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

[hidden] {
    display: none !important;
}

.site-footer {
    padding: 18px 24px;
    border-top: 1px solid #e3ebf5;
    color: #718096;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 900px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .details-panel {
        grid-template-columns: 1fr;
    }

    .details-image,
    .details-image-placeholder {
        min-height: 240px;
        max-height: 380px;
    }
}

@media (max-width: 600px) {
    .header-inner {
        padding: 12px 16px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

    .brand-name {
        font-size: 22px;
    }

    .header-links {
        gap: 6px;
    }

    .header-links a {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 12px;
    }

    .services-page-main {
        padding: 28px 16px 54px;
    }

    .listing-toolbar,
    .service-form {
        grid-template-columns: 1fr;
    }

    .field-wide,
    .form-actions,
    .form-feedback {
        grid-column: 1;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .service-card-image,
    .service-image-placeholder {
        height: 190px;
    }

    .panel {
        padding: 16px;
    }

    .details-facts div {
        flex-direction: column;
        gap: 5px;
    }

    .details-facts dd {
        text-align: right;
    }

    .contact-actions > * {
        width: 100%;
    }
}
