:root {
    --primary: #1155fd;
    --primary-soft: rgba(17, 85, 253, 0.08);
    --secondary: #019eff;
    --secondary-soft: rgba(1, 158, 255, 0.08);
    --accent: #19cefe;
    --accent-soft: rgba(25, 206, 254, 0.08);
    --dark: #0b1220;
    --text: #475467;
    --muted: #667085;
    --light: #f5f8ff;
    --border: #e2e8f5;
    --white: #ffffff;
    --success: #0cbc87;
    --danger: #d6293e;
    --shadow: 0 10px 30px rgba(17, 85, 253, 0.05);
    --container: min(1140px, calc(100% - 48px));
    --fs-base: 16px;
    --fs-small: 14px;
    --fs-eyebrow: 12px;
    --fs-hero: 58px;
    --fs-page-title: 46px;
    --fs-section-title: 36px;
    --fs-card-title: 20px;
    --fs-lead: 18px;
    --section-y: 80px;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--fs-base);
    line-height: 1.65;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    color: inherit;
}

p,
h1,
h2,
h3 {
    overflow-wrap: anywhere;
}

.container {
    width: var(--container);
    margin-inline: auto;
}

.system-alert {
    padding: 10px 16px;
    color: #7f1d1d;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
    text-align: center;
    font-size: var(--fs-small);
}

.site-header {
    z-index: 40;
    width: 100%;
    margin: 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

.site-header--sticky {
    position: sticky;
    top: 0;
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    width: 178px;
    min-width: 178px;
    padding: 9px 12px;
    background: transparent;
    border-radius: var(--radius);
}

.brand img {
    width: 100%;
    height: auto;
}

@media (min-width: 861px) {
    .site-nav {
        display: flex;
        align-items: stretch;
        gap: 28px;
        flex: 1;
        align-self: stretch;
        justify-content: center;
    }
    .site-nav a {
        display: inline-flex;
        align-items: center;
        padding: 0 4px;
        color: var(--muted);
        font-size: var(--fs-small);
        font-weight: 600;
        transition: all 0.2s ease;
        border-bottom: 3px solid transparent;
        margin-bottom: -1px;
        border-radius: 0 !important;
        background: transparent !important;
    }
    .site-nav a:hover {
        color: var(--dark) !important;
        border-bottom-color: #cbd5e1 !important;
        background: transparent !important;
    }
    .site-nav a.active {
        color: var(--primary) !important;
        border-bottom-color: var(--primary) !important;
        background: transparent !important;
        font-weight: 700;
    }
}

@media (max-width: 860px) {
    .site-nav a.active {
        color: var(--primary) !important;
        font-weight: 700;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-weight: 800;
    white-space: nowrap;
}

.phone-link i {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: #f1f5f9;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nav-toggle:hover {
    background: #e2e8f0;
}

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--dark);
    border-radius: 999px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle span:nth-child(2) {
    width: 14px;
    transform: translateX(4px);
}

.mobile-nav-cta {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    box-shadow: 0 4px 14px rgba(17, 85, 253, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0045eb 0%, #008be5 100%);
    box-shadow: 0 6px 20px rgba(17, 85, 253, 0.3);
}

.btn-secondary {
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid rgba(17, 85, 253, 0.15);
}

.btn-secondary:hover {
    background: rgba(17, 85, 253, 0.15);
    border-color: rgba(17, 85, 253, 0.25);
}

.btn-ghost {
    color: var(--dark);
    background: var(--white);
    border-color: var(--border);
}

.btn-light {
    color: var(--primary);
    background: var(--white);
    border-color: var(--white);
}

.btn-outline-light {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn.full {
    width: 100%;
}

.hero-section {
    width: 100%;
    margin: 0;
    background: linear-gradient(180deg, #f8fbff 0%, var(--white) 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-slider {
    position: relative;
    min-height: 540px;
    display: grid;
    align-items: center;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.74fr);
    gap: 52px;
    align-items: center;
    padding: 76px 0 84px;
}

.hero-slide.is-active {
    display: grid;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px 12px;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid rgba(17, 85, 253, 0.08);
    border-radius: 999px;
    font-weight: 700;
    font-size: var(--fs-eyebrow);
    line-height: 1.2;
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0;
    color: var(--dark);
    font-weight: 800;
    line-height: 1.1;
}

.hero-copy h1 {
    max-width: 680px;
    font-size: var(--fs-hero);
}

.hero-copy,
.hero-media,
.split-layout > *,
.detail-layout > *,
.contact-layout > *,
.two-column > * {
    min-width: 0;
}

.page-hero h1 {
    font-size: var(--fs-page-title);
}

.hero-copy p,
.page-hero p,
.section-heading p,
.section-bar p {
    color: var(--muted);
    font-size: var(--fs-lead);
    line-height: 1.75;
}

.hero-copy p {
    max-width: min(660px, 100%);
    margin: 18px 0 0;
}

.page-hero p,
.section-heading p,
.section-bar p {
    margin: 12px 0 0;
}

.hero-actions,
.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.cta-actions.keep-row {
    flex-wrap: nowrap;
    align-items: center;
    min-width: 250px;
    margin-top: 0;
}

.cta-actions.keep-row .btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

.hero-media img,
.content-image,
.reference-card img,
.blog-card img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

.hero-media img {
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
}

.security-panel {
    overflow: hidden;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-top {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.panel-top span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--border);
}

.camera-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.camera-layout div {
    min-height: 126px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 16px;
    color: var(--dark);
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.camera-layout i {
    color: var(--primary);
    font-size: 30px;
}

.slider-controls {
    position: absolute;
    left: 0;
    bottom: 32px;
    display: flex;
    gap: 8px;
}

.slider-controls button {
    width: 10px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 85, 253, 0.18);
    cursor: pointer;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.slider-controls button.is-active {
    width: 28px;
    background: var(--primary);
}

.slider-arrow {
    position: absolute;
    top: auto;
    bottom: 32px;
    z-index: 3;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    color: var(--dark);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(17, 85, 253, 0.08);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(17, 85, 253, 0.05);
    cursor: pointer;
    transform: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-arrow:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(17, 85, 253, 0.2);
    transform: translateY(-1px);
}

.slider-arrow-prev {
    right: 56px;
}

.slider-arrow-next {
    right: 0;
}

.section {
    width: 100%;
    margin: 0;
    padding: var(--section-y) 0;
    background: var(--white);
    border-bottom: 1px solid #edf0f4;
}

.section-soft {
    background: var(--light);
}

.split-layout,
.detail-layout,
.contact-layout,
.two-column {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 42px;
    align-items: center;
}

.detail-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
}

.contact-layout {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
}

.two-column {
    align-items: start;
}

.image-tile {
    min-height: 330px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.image-tile img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
}

.image-tile i {
    font-size: 72px;
}

.section h1,
.section h2,
.page-hero h1 {
    color: var(--dark);
}

.section h2 {
    margin: 0 0 12px;
    font-size: var(--fs-section-title);
    font-weight: 800;
    line-height: 1.18;
}

.section p {
    color: var(--muted);
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 32px;
    text-align: center;
}

.section-heading.align-left {
    margin-inline: 0;
    text-align: left;
}

.section-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.section-bar-copy {
    max-width: 720px;
}

.section-bar h2 {
    margin: 0;
    color: var(--dark);
    font-size: var(--fs-section-title);
    font-weight: 800;
    line-height: 1.18;
}

.section-bar .btn {
    flex: 0 0 auto;
}

.service-grid,
.feature-grid,
.blog-grid,
.reference-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-grid.why-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.feature-card,
.blog-card,
.reference-card,
.form-card,
.contact-panel,
.aside-box,
.compact-list article {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card,
.feature-card {
    min-height: 248px;
    padding: 28px;
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-card:hover,
.feature-card:hover,
.blog-card:hover,
.reference-card:hover {
    transform: translateY(-6px);
    border-color: rgba(17, 85, 253, 0.2);
    box-shadow: 0 15px 35px rgba(17, 85, 253, 0.08);
}

.service-card h3,
.service-card h2,
.feature-card h3,
.feature-card h2 {
    margin: 16px 0 8px;
    color: var(--dark);
    font-size: var(--fs-card-title);
    font-weight: 800;
    line-height: 1.28;
}

.service-card p,
.feature-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: var(--fs-small);
    line-height: 1.6;
}

.card-icon {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.service-card:hover .card-icon,
.feature-card:hover .card-icon {
    transform: scale(1.08);
    background-color: var(--primary);
    color: var(--white);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--primary);
    font-weight: 800;
    font-size: var(--fs-small);
    transition: gap 0.2s ease;
}

.service-card:hover .card-link {
    gap: 12px;
}

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cta-bg), #0f5fc7);
    border-radius: var(--radius);
}

.cta-band h2,
.cta-band p {
    color: var(--white);
}

.cta-band h2 {
    margin: 0 0 8px;
}

.cta-band p {
    margin: 0;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.logo-card {
    min-height: 90px;
    display: grid;
    place-items: center;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--dark);
    font-weight: 900;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.logo-card:hover {
    border-color: rgba(17, 85, 253, 0.2);
    box-shadow: 0 8px 20px rgba(17, 85, 253, 0.05);
}

.logo-card img {
    max-height: 54px;
    filter: grayscale(100%);
    opacity: 0.65;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.logo-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-list article {
    padding: 18px;
}

.compact-list h3 {
    margin: 0 0 6px;
    color: var(--dark);
}

.compact-list p {
    margin: 0;
}

.page-hero {
    width: 100%;
    margin: 0;
    padding: 70px 0 64px;
    background: var(--light);
    border-bottom: 1px solid var(--border);
}

.page-hero--narrow .container {
    max-width: 900px;
}

.page-hero .btn {
    margin-top: 24px;
}

.content-layout {
    max-width: 900px;
}

.content-image {
    max-height: 430px;
    border: 1px solid var(--border);
}

.content-image + .prose {
    margin-top: 24px;
}

.prose {
    color: var(--text);
    font-size: var(--fs-lead);
}

.feature-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.feature-list article {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--light);
}

.feature-list h2 {
    font-size: 22px;
}

.detail-aside {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 96px;
}

.aside-box {
    padding: 22px;
}

.aside-box h2 {
    font-size: 22px;
}

.aside-box ul {
    display: grid;
    gap: 8px;
    padding-left: 20px;
}

.reference-card,
.blog-card {
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.reference-card img,
.blog-card img {
    aspect-ratio: 16 / 10;
    border-radius: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reference-card:hover img,
.blog-card:hover img {
    transform: scale(1.05);
}

.card-placeholder {
    aspect-ratio: 16 / 10;
    border-radius: 0;
    display: grid;
    place-items: center;
    background: var(--light);
    border-bottom: 1px solid var(--border);
}

.card-placeholder-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--white);
    border: 1px solid #d7e5ff;
    border-radius: var(--radius);
    font-size: 24px;
}

.reference-card > div:not(.card-placeholder),
.blog-card > div:not(.card-placeholder) {
    padding: 18px;
}

.blog-card--compact {
    padding: 18px;
}

.reference-card span,
.blog-card time {
    color: var(--primary);
    font-weight: 800;
    font-size: var(--fs-eyebrow);
}

.reference-card h2,
.reference-card h3,
.blog-card h2,
.blog-card h3 {
    margin: 8px 0;
    color: var(--dark);
    font-size: var(--fs-card-title);
    font-weight: 800;
    line-height: 1.3;
}

.reference-card p,
.blog-card p {
    margin: 0;
    font-size: var(--fs-small);
    line-height: 1.7;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 24px;
    text-align: center;
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.contact-panel,
.form-card {
    padding: 24px;
}

.contact-panel h2 {
    font-size: 26px;
}

.contact-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
}

.contact-list.big li {
    padding: 12px 0;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.contact-list i {
    width: 20px;
    color: var(--primary);
    padding-top: 4px;
}

.map-frame {
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.map-frame iframe {
    display: block;
    width: 100%;
    min-height: 260px;
    border: 0;
}

.form-shell {
    max-width: 920px;
}

.form-card {
    display: grid;
    gap: 16px;
}

.form-card.wide {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--dark);
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    padding: 11px 12px;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.2s ease;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    padding-right: 40px;
}

input[type="file"] {
    padding: 0;
    line-height: 1;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: none;
    background: var(--light);
    padding: 11px 16px;
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    border-right: 1px solid var(--border);
}

input[type="file"]::file-selector-button:hover {
    background: #e2e8f0;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(18, 104, 216, 0.12);
}

textarea {
    resize: vertical;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.checkbox-line input {
    width: auto;
}

.hp-field {
    position: absolute;
    left: -9999px;
}

.notice {
    padding: 12px 14px;
    border-radius: var(--radius);
    font-weight: 700;
}

.notice.success {
    color: #065f46;
    background: #d1fae5;
}

.notice.error {
    color: #991b1b;
    background: #fee2e2;
}

.site-footer {
    width: 100%;
    margin: 0;
    color: #94a3b8;
    background: #070c18;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 0.9fr 1fr;
    gap: 28px;
    padding: 52px 0;
}

.footer-brand img {
    width: 204px;
    padding: 0;
    background: transparent;
    border-radius: var(--radius);
}

.footer-brand p {
    max-width: 360px;
    color: #64748b;
    font-size: var(--fs-small);
    line-height: 1.6;
    margin-top: 12px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer a,
.site-footer li {
    color: #94a3b8;
    font-size: var(--fs-small);
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--secondary);
}

.social-list {
    display: flex;
    gap: 10px;
}

.social-list a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-list a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aebed3;
    font-size: var(--fs-small);
}

@media (max-width: 1080px) {
    :root {
        --container: min(100% - 44px, 1120px);
        --fs-hero: 48px;
        --fs-page-title: 40px;
        --fs-section-title: 31px;
    }

    .header-actions .phone-link {
        display: none;
    }

    .service-grid,
    .feature-grid,
    .blog-grid,
    .reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-grid.why-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .logo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    :root {
        --container: calc(100% - 36px);
        --fs-hero: 40px;
        --fs-page-title: 36px;
        --fs-section-title: 29px;
        --fs-lead: 16px;
        --section-y: 60px;
    }

    .header-inner {
        justify-content: space-between;
        min-height: 72px;
    }

    .brand {
        width: 160px;
        min-width: 160px;
    }

    .nav-toggle {
        display: inline-flex;
        position: relative;
        z-index: 1001;
    }

    body.nav-open .nav-toggle {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        border-color: transparent !important;
        background: transparent !important;
        z-index: 1001 !important;
    }

    body.nav-open .nav-toggle span {
        background: var(--dark) !important;
        position: absolute !important;
        margin: 0 !important;
    }

    body.nav-open .nav-toggle span:nth-child(1) {
        transform: rotate(45deg);
    }

    body.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.nav-open .nav-toggle span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 280px;
        height: 100vh;
        display: flex;
        padding: 80px 24px 24px;
        background: var(--white);
        box-shadow: none;
        flex-direction: column;
        align-items: stretch;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
    }

    body.nav-open .site-nav {
        transform: translateX(0);
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    }

    .site-nav a {
        padding: 12px 20px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 15px;
        color: var(--dark) !important;
        border-bottom: none !important;
        margin-bottom: 6px;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
    }

    .site-nav a.active {
        background: var(--primary-soft) !important;
        color: var(--primary) !important;
        font-weight: 700 !important;
    }

    .site-nav a:hover {
        background: var(--light) !important;
        color: var(--primary) !important;
    }

    /* Mobile Nav Backdrop Overlay */
    .nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 39;
    }

    body.nav-open .nav-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .header-actions {
        display: none !important;
    }

    .mobile-nav-cta {
        display: block !important;
        margin-top: auto;
        padding-top: 24px;
        padding-bottom: 24px;
        border-top: 1px solid var(--border);
    }
    
    .mobile-nav-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .hero-slider {
        min-height: auto;
    }

    .hero-slide,
    .split-layout,
    .detail-layout,
    .contact-layout,
    .two-column {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        gap: 32px;
        padding: 56px 0 82px;
    }

    .section-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .section-bar .btn {
        align-self: flex-start;
    }

    .slider-controls {
        left: 0;
        bottom: 28px;
    }

    .slider-arrow {
        bottom: 22px;
        width: 40px;
        height: 40px;
    }

    .detail-aside {
        position: static;
    }

    .cta-band,
    .footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    :root {
        --container: calc(100% - 24px);
        --fs-hero: 36px;
        --fs-page-title: 32px;
        --fs-section-title: 27px;
        --fs-card-title: 19px;
        --section-y: 52px;
    }

    .brand {
        width: 146px;
        min-width: 146px;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: var(--fs-hero);
    }

    .page-hero {
        padding: 52px 0;
    }

    .service-grid,
    .feature-grid,
    .blog-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        padding: 32px 0 48px !important;
        gap: 20px !important;
    }

    .hero-copy h1 {
        font-size: 28px !important;
        line-height: 1.25 !important;
    }

    .hero-copy p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-top: 10px !important;
    }

    .hero-media {
        max-width: 280px !important;
        margin: 0 auto !important;
    }

    .logo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .logo-card {
        min-height: 60px !important;
        padding: 8px !important;
    }

    .logo-card img {
        max-height: 32px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center !important;
    }

    .footer-brand {
        grid-column: span 1 !important;
        margin-bottom: 0 !important;
    }

    .footer-brand p {
        max-width: 100% !important;
    }

    .footer-brand .social-list {
        justify-content: center !important;
    }

    .footer-grid > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-grid h4 {
        text-align: center !important;
    }

    .footer-links li {
        justify-content: center !important;
    }

    .footer-contact li {
        justify-content: center !important;
        text-align: center !important;
    }

    .footer-grid > div:last-child {
        grid-column: span 1 !important;
    }

    .camera-layout {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .cta-actions,
    .cta-actions.keep-row {
        flex-direction: column;
        width: 100%;
    }

    .btn,
    .section-bar .btn,
    .cta-actions.keep-row .btn {
        width: 100%;
    }

    .service-card,
    .feature-card,
    .contact-panel,
    .form-card,
    .aside-box {
        padding: 20px;
    }

    .cta-band {
        padding: 24px;
    }
}

/* Service Card Redesign Overrides */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    min-height: auto; /* Reset older min-height */
}

.service-card .card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 20px;
    margin-bottom: 24px;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.service-card:hover .card-icon {
    transform: scale(1.05);
    background-color: var(--primary);
    color: var(--white);
}

.service-card h3 {
    margin: 0 0 12px;
    color: var(--dark);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.service-card p {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* Featured Service Card */
.service-card--featured {
    grid-column: span 1;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card--featured .service-card-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.service-card--featured .service-card-header .card-icon {
    margin-bottom: 0;
}

.service-card--featured .service-card-info h3 {
    margin-top: 0;
}

.service-card-illustration {
    margin-top: 32px;
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.service-card-illustration img {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: var(--radius);
}

/* Responsive Media Queries for New Grid */
@media (max-width: 980px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .service-card--featured {
        grid-column: span 2;
        grid-row: span 1;
    }
    .service-card-illustration {
        margin-top: 24px;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .service-grid {
        grid-template-columns: 1fr;
    }
    .service-card--featured {
        grid-column: span 1;
        grid-row: span 1;
    }
    .service-card--featured .service-card-header {
        flex-direction: column;
        gap: 16px;
    }
}

/* Projects/References Card Redesign Overrides */
.reference-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
}

.reference-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    height: 340px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #111 !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    padding: 0 !important;
    text-decoration: none !important;
}

.reference-card img,
.reference-card .card-placeholder {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    z-index: 1 !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
}

.reference-card .card-placeholder {
    display: grid !important;
    place-items: center !important;
    background: linear-gradient(135deg, #1f2937, #111827) !important;
    color: var(--muted) !important;
}

.reference-card-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.85) 100%) !important;
    z-index: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.reference-card-content {
    position: relative !important;
    padding: 24px !important;
    color: var(--white) !important;
    z-index: 3 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    background: transparent !important;
}

.reference-card .reference-card-category {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    display: block !important;
    margin-bottom: 6px !important;
}

.reference-card .reference-card-content h3 {
    margin: 0 !important;
    color: var(--white) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.reference-card .reference-card-content p {
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    opacity: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.reference-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 40px rgba(17, 85, 253, 0.15) !important;
}

.reference-card:hover img {
    transform: scale(1.05) !important;
}

.reference-card--wide .reference-card-content p,
.reference-card:hover .reference-card-content p {
    opacity: 1 !important;
    max-height: 100px !important;
    margin-top: 10px !important;
}

.reference-card--wide {
    grid-column: span 2 !important;
}

/* Horizontal Blog Grid Redesign */
.blog-grid--horizontal {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
}

.blog-card--horizontal {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 20px !important;
    background: var(--white) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow) !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
    min-height: auto !important;
}

.blog-card--horizontal:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(17, 85, 253, 0.2) !important;
    box-shadow: 0 12px 30px rgba(17, 85, 253, 0.08) !important;
}

.blog-card--horizontal .blog-card-media,
.blog-card--horizontal .blog-card-body {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.blog-card-media {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f1f3f9 !important;
}

.blog-card--horizontal .blog-card-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 12px !important;
}

.blog-placeholder-image {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    color: var(--muted) !important;
    font-size: 24px !important;
}

.blog-card-body {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 120px !important;
    box-sizing: border-box !important;
}

.blog-card-body h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    color: var(--dark) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.blog-card-body h3 a {
    color: var(--dark) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.blog-card-body h3 a:hover {
    color: var(--primary) !important;
}

.blog-card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 12px !important;
    border-top: 1px solid #f1f3f9 !important;
    margin-top: auto !important;
}

.blog-card-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.author-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin: 0 !important;
}

.author-info {
    display: flex !important;
    flex-direction: column !important;
}

.author-name {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--dark) !important;
}

.author-info time {
    font-size: 10px !important;
    color: var(--muted) !important;
    margin-top: 2px !important;
}

.blog-card-tag {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
    background: var(--primary-soft) !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
}

/* Projects and Blog Responsiveness */
@media (max-width: 1024px) {
    .reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .reference-card--wide {
        grid-column: span 2 !important;
    }
}

@media (max-width: 768px) {
    .blog-grid--horizontal {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .reference-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 12px !important;
        padding-bottom: 12px !important;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .reference-grid::-webkit-scrollbar {
        display: none;
    }
    .reference-grid.reference-grid--stacked {
        display: grid !important;
        grid-template-columns: 1fr !important;
        overflow-x: visible !important;
        padding-bottom: 0 !important;
        gap: 24px !important;
    }
    .reference-grid.reference-grid--stacked .reference-card {
        flex: none !important;
        width: 100% !important;
    }
    .reference-grid.reference-grid--stacked .reference-card-media {
        height: 240px !important;
    }
    .reference-card {
        flex: 0 0 260px !important;
        scroll-snap-align: start;
    }
    .reference-card--wide {
        grid-column: auto !important;
    }
    .reference-card-media {
        height: 180px !important;
    }
    .reference-card p {
        display: none !important;
    }
    .reference-card-content {
        padding: 12px !important;
    }
    .reference-card h3 {
        font-size: 13px !important;
        margin-top: 4px !important;
    }
    .reference-card-category {
        font-size: 9px !important;
    }

    .blog-card--horizontal {
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px !important;
    }
    .blog-card-media {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px !important;
        border-radius: 8px !important;
    }
    .blog-card-body {
        width: calc(100% - 92px) !important;
        height: 80px !important;
        justify-content: space-between !important;
    }
    .blog-card-body h3 {
        font-size: 13px !important;
        margin-bottom: 0 !important;
        line-height: 1.35 !important;
        -webkit-line-clamp: 2 !important;
    }
    .blog-card-footer {
        padding-top: 4px !important;
        border-top: none !important;
    }
    .blog-card-author .author-avatar {
        width: 20px !important;
        height: 20px !important;
    }
    .blog-card-author .author-name {
        display: none !important;
    }
    .blog-card-tag {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
}


/* Footer Bottom Layout */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.footer-bottom-left, .footer-bottom-right {
    flex: 1;
}
.footer-bottom-right {
    display: flex;
    justify-content: flex-end;
}
.footer-bottom-center {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}
.footer-macework-signature {
    opacity: 0.6;
    transition: opacity 0.2s ease;
    display: block;
}
.footer-macework-signature:hover {
    opacity: 1;
}
.footer-bottom-right .social-list {
    margin: 0;
}
@media (max-width: 980px) {
    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 24px;
    }
    .footer-bottom-left, .footer-bottom-right {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}
.back-to-top i {
    font-size: 16px;
    transition: transform 0.2s ease;
}
.back-to-top:hover i {
    transform: translateY(-2px);
}

/* 3D Tilt Effect on Slider Media */
.hero-media {
    perspective: 1000px;
    transform-style: preserve-3d;
}
.hero-media img,
.hero-media .security-panel {
    transition: transform 0.3s cubic-bezier(0.25, 0.6, 0.25, 1), box-shadow 0.3s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}



/* Project Detail Sidebar Redesign */
.project-info-card h2,
.related-projects-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-soft);
    padding-bottom: 10px;
}

.project-client-logo {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--light);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.project-client-logo img {
    max-height: 50px;
    max-width: 100%;
    object-fit: contain;
}

.project-info-specs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.project-info-spec {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
.project-info-spec:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.spec-value {
    color: var(--dark);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.project-info-cta-text {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 20px;
    background: var(--primary-soft);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.project-info-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 700;
}

/* Related Projects List */
.related-projects-list {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column;
    gap: 16px;
}

.related-project-item {
    display: flex;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}
.related-project-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-project-thumb {
    width: 64px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.related-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-project-thumb.placeholder {
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}
.related-project-thumb.placeholder i {
    font-size: 18px;
}

.related-project-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-project-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
    line-height: 1.3;
}
.related-project-link:hover {
    color: var(--primary);
}

.related-project-category {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}



/* PNG Slider Image Specific Styles */
.hero-media.is-png,
.hero-media.is-png img {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}
