/*
 * Reusable components: buttons, eyebrow badge, section heading, cards,
 * tags, accordion, forms, pagination, flash messages, floating widgets.
 */

/* ---------- Buttons ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

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

.button-primary { background: var(--color-brand-hover); color: var(--color-white); }
.button-primary:hover { background: #047857; }

.button-dark { background: var(--color-navy); color: var(--color-white); }
.button-dark:hover { background: var(--color-navy-soft); }

.button-outline { border-color: var(--color-border); background: var(--color-white); color: var(--color-text); }
.button-outline:hover { border-color: var(--color-brand); color: var(--color-brand-hover); }

.button-glass {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
    backdrop-filter: blur(6px);
}
.button-glass:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.12); }

.button-lg { padding: 11px 22px; font-size: 14.5px; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-brand-hover);
    font-weight: 600;
    font-size: 15px;
}
.text-link:hover { color: var(--color-brand); }

/* ---------- Eyebrow / section heading ---------- */
.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--color-brand-hover);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 40px;
    margin-bottom: 32px;
}

.section-heading > p { max-width: 480px; color: var(--color-text-muted); font-size: 14.5px; }

.section-heading--centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.section-heading--centered > p { max-width: 600px; }

.section-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.section-footer--centered { justify-content: center; }

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card {
    padding: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(16, 185, 129, 0.45); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--color-text-muted); font-size: 14px; line-height: 1.6; }
.card .text-link { margin-top: 14px; font-size: 14px; }

.icon-badge {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--color-brand-soft);
    color: var(--color-brand-hover);
    font-size: 18px;
}
.icon-badge svg { width: 26px; height: 26px; }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag-list span {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    color: var(--color-text-body);
    font-size: 13px;
    font-weight: 500;
}

/* ---------- Media cards (projects & blog) ---------- */
.media-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.media-card__image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-navy);
}
.media-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.media-card:hover .media-card__image img { transform: scale(1.04); }

.media-card__body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.media-card__meta { margin-bottom: 8px; color: var(--color-brand-hover); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.media-card__body h3 a:hover { color: var(--color-brand-hover); }
.media-card__body p { margin-top: 10px; color: var(--color-text-muted); }
.media-card__actions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: auto; padding-top: 18px; }

/* ---------- Shared Services Bento Cards (Home & Services Index) ---------- */
.services-bento--3col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-bento {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px 18px 18px;
    border-radius: 16px;
    background: var(--color-white);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s ease,
                border-color 0.28s ease;
}

.service-bento::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981 0%, #0ea5e9 100%);
    opacity: 0;
    transform: scaleX(0.35);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-bento:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.32);
}

.service-bento:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.service-bento__glow {
    position: absolute;
    inset-block-start: -48px;
    inset-inline-end: -48px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.10) 0%, rgba(14, 165, 233, 0.05) 45%, transparent 72%);
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.service-bento:hover .service-bento__glow {
    opacity: 1;
    transform: scale(1.15);
}

.service-bento__top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.service-bento__icon .icon-badge {
    margin-bottom: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.16);
    transition: transform 0.28s ease, background 0.28s ease;
}

.service-bento:hover .service-bento__icon .icon-badge {
    transform: scale(1.06);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--color-white);
}

.service-bento__index {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #cbd5e1;
    transition: color 0.28s ease;
}

.service-bento:hover .service-bento__index {
    color: var(--color-brand);
}

.service-bento__body {
    position: relative;
    z-index: 2;
    flex: 1;
}

.service-bento__body h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 7px;
}

.service-bento__body p {
    color: var(--color-text-muted);
    font-size: 13.8px;
    line-height: 1.62;
}

.service-bento__footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-block-start: 1px solid rgba(15, 23, 42, 0.05);
}

.service-bento__cta {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-brand-hover);
}

.service-bento__arrow {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--color-navy);
    font-size: 13px;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.service-bento:hover .service-bento__arrow {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: var(--color-white);
    transform: translateX(3px);
}

[dir='rtl'] .service-bento:hover .service-bento__arrow {
    transform: scaleX(-1) translateX(3px);
}

@media (max-width: 1024px) {
    .services-bento--3col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .services-bento--3col {
        grid-template-columns: 1fr;
    }
}

/* ---------- Editorial Blog / Insights Cards ---------- */
.post-editorial {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s ease,
                border-color 0.28s ease;
}

.post-editorial::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981 0%, #0ea5e9 100%);
    opacity: 0;
    transform: scaleX(0.35);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-editorial:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.32);
}

.post-editorial:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.post-editorial__thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-surface-alt);
}

.post-editorial__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.post-editorial:hover .post-editorial__thumb img {
    transform: scale(1.04);
}

.post-editorial__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 22px 18px;
}

.post-editorial__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.post-editorial__date {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-brand-hover);
}

.post-editorial__tag {
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
}

.post-editorial__title {
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-navy);
    margin-bottom: 8px;
}

.post-editorial__title a:hover {
    color: var(--color-brand-hover);
}

.post-editorial__excerpt {
    color: var(--color-text-muted);
    font-size: 13.8px;
    line-height: 1.62;
    margin-bottom: 18px;
}

.post-editorial__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-block-start: 1px solid rgba(15, 23, 42, 0.05);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-brand-hover);
}

.post-editorial__arrow {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--color-navy);
    font-size: 12.5px;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.post-editorial:hover .post-editorial__arrow {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: var(--color-white);
    transform: translate(2px, -2px);
}

/* Generated cover shown when an item has no image */
.cover-art {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 20px;
    color: var(--color-white);
    background: linear-gradient(135deg, #0f172a, #0f3d33);
}
.cover-art--2 { background: linear-gradient(135deg, #0f172a, #1e3a5f); }
.cover-art--3 { background: linear-gradient(135deg, #064e3b, #0f172a); }
.cover-art__kicker { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }
.cover-art__index { font-size: 44px; font-weight: 700; line-height: 1; color: var(--color-brand); }
.cover-art__title { font-size: 17px; font-weight: 600; line-height: 1.35; }

/* ---------- Accordion (FAQ) ---------- */
.accordion { display: grid; gap: 10px; max-width: 780px; margin-inline: auto; }
.accordion__item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: var(--color-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.accordion__item[open] {
    border-color: rgba(16, 185, 129, 0.32);
    box-shadow: var(--shadow-sm);
}
.accordion__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 20px;
    color: var(--color-navy);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    border-radius: 14px;
}
.accordion__item summary:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.45);
    outline-offset: -2px;
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after {
    content: '+';
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-brand-soft);
    color: var(--color-brand-hover);
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.accordion__item[open] summary::after {
    content: '–';
    background: var(--color-brand);
    color: var(--color-white);
}
.accordion__item p {
    padding: 0 20px 16px;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.65;
}

/* ---------- Forms ---------- */
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-field { display: grid; gap: 6px; margin-bottom: 16px; }
.form-field label { color: var(--color-text); font-size: 14px; font-weight: 600; }
.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-ring); }
.form-hint { color: var(--color-text-muted); font-size: 13px; }
.field-error { color: var(--color-danger); font-size: 13px; }
.form-trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pagination (Laravel default view) ---------- */
.pagination-wrap { margin-top: 40px; }
.pagination-wrap nav { display: flex; justify-content: center; }
.pagination-wrap svg { display: inline; width: 18px; height: 18px; }
.pagination-wrap a,
.pagination-wrap span[aria-current] span,
.pagination-wrap span[aria-disabled] span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 3px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: 14px;
}
.pagination-wrap a:hover { border-color: var(--color-brand); color: var(--color-brand-hover); }
.pagination-wrap span[aria-current] span { border-color: var(--color-brand-hover); background: var(--color-brand-hover); color: var(--color-white); }
.pagination-wrap p { display: none; }

/* ---------- Flash messages & empty state ---------- */
.flash { margin-top: 20px; padding: 14px 18px; border-radius: var(--radius-md); font-size: 15px; }
.flash-success { background: var(--color-brand-soft); color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fef3f2; color: var(--color-danger); border: 1px solid #fecdca; }
.flash ul { margin-top: 6px; padding-inline-start: 18px; list-style: disc; }

.empty-state {
    grid-column: 1 / -1;
    padding: 40px;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--color-text-muted);
}

/* ---------- Floating widgets ---------- */
.whatsapp-fab {
    position: fixed;
    inset-block-end: 24px;
    inset-inline-end: 24px;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: var(--color-white);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 28px; height: 28px; fill: currentColor; }

/* Browser push opt-in (markup: partials/push-optin.blade.php, logic: js/notifications.js) */
.browser-push-control { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; z-index: 40; max-width: 320px; }
.browser-push-prompt {
    position: relative;
    margin-bottom: 12px;
    padding-block: 18px;
    padding-inline: 18px 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
}
.browser-push-prompt[hidden],
.browser-push-button[hidden] { display: none; }
.browser-push-prompt strong { display: block; margin-bottom: 4px; color: var(--color-text); }
.browser-push-prompt__close {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-end: 10px;
    border: 0;
    background: none;
    color: var(--color-text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.browser-push-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--color-navy);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}
.browser-push-button svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.browser-push-status { margin-top: 8px; font-size: 13px; color: var(--color-text-muted); }
.browser-push-status:empty { display: none; }

@media (max-width: 640px) {
    .browser-push-control { inset-inline-start: 16px; inset-block-end: 16px; max-width: calc(100vw - 104px); }
    .whatsapp-fab { inset-inline-end: 16px; inset-block-end: 16px; }
    /* Icon-only bell on phones so it never covers page content */
    .browser-push-button { width: 48px; height: 48px; justify-content: center; padding: 0; }
    .browser-push-button span { display: none; }
}


[dir='rtl'] .project-external-btn span,
[dir='rtl'] .button > span[aria-hidden='true'],
[dir='rtl'] .text-link > span[aria-hidden='true'] {
    display: inline-block;
    transform: scaleX(-1);
}

[dir='rtl'] .post-editorial__arrow {
    transform: scaleX(-1);
}
[dir='rtl'] .post-editorial:hover .post-editorial__arrow {
    transform: scaleX(-1) translate(-2px, -2px); /* or handled correctly */
}
.projects-premium-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card-premium {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s ease,
                border-color 0.28s ease;
}

.project-card-premium::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(16, 185, 129, 0.07), transparent 65%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.36);
}

.project-card-premium:hover::after {
    opacity: 1;
}

/* Featured 2-column horizontal bento card for the lead case study */
.project-card-premium--featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.project-card-premium__stage-light {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 38px 18px 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-block-end: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(145deg, #e2eaf4 0%, #dcf2ea 100%);
}

.project-card-premium--v2 .project-card-premium__stage-light {
    background: linear-gradient(145deg, #e4e9f5 0%, #dde7f6 100%);
}
.project-card-premium--v3 .project-card-premium__stage-light {
    background: linear-gradient(145deg, #dcf3ea 0%, #e3ecf7 100%);
}
.project-card-premium--v4 .project-card-premium__stage-light {
    background: linear-gradient(145deg, #e6ecf4 0%, #dce7f5 100%);
}

.project-card-premium--featured .project-card-premium__stage-light {
    aspect-ratio: auto;
    height: 100%;
    min-height: 245px;
    align-items: center;
    padding: 48px 22px 24px;
    border-block-end: 0;
    border-inline-end: 1px solid rgba(15, 23, 42, 0.05);
}

.project-card-premium--featured .project-mini-ui {
    height: auto;
    border-radius: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.project-card-premium__raster-wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-bottom: 0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card-premium:hover .project-card-premium__raster-wrap {
    transform: translateY(-3px);
}

.project-card-premium__raster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Crisp Light-Mode Mini UI Window */
.project-mini-ui {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 12px 12px 0 0;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom: 0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.project-card-premium:hover .project-mini-ui {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.11);
}

.project-mini-ui__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.project-mini-ui__dots {
    display: inline-flex;
    gap: 4px;
}
.project-mini-ui__dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
}
.project-mini-ui__dots i:first-child { background: #fca5a5; }
.project-mini-ui__dots i:nth-child(2) { background: #fcd34d; }
.project-mini-ui__dots i:nth-child(3) { background: #6ee7b7; }

.project-mini-ui__domain {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-mini-ui__live {
    margin-inline-start: auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.project-mini-ui__canvas {
    padding: 12px 14px;
    display: grid;
    gap: 10px;
    flex: 1;
    align-content: start;
}

.project-mini-ui__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-mini-ui__monogram {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.project-mini-ui__meta {
    min-width: 0;
    display: grid;
    gap: 1px;
}
.project-mini-ui__meta strong {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--color-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-mini-ui__meta span {
    font-size: 9.5px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.project-mini-ui__widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: end;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.project-mini-ui__bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 44px;
}
.project-mini-ui__bars span {
    flex: 1;
    height: var(--h);
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, #10b981 0%, #38bdf8 100%);
    opacity: 0.85;
}

.project-mini-ui__lines {
    display: grid;
    gap: 6px;
}
.project-mini-ui__lines span {
    height: 5px;
    border-radius: 3px;
    background: #e2e8f0;
}
.project-mini-ui__lines span.is-short {
    width: 64%;
}

.project-card-premium__floating-badge {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-start: 14px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--color-navy);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    z-index: 2;
}

.project-featured-kicker {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--color-brand-hover);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-card-premium__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.project-tech-chip {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: var(--color-text-muted);
    font-size: 10.5px;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .projects-premium-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .project-card-premium--featured {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .projects-premium-grid {
        grid-template-columns: 1fr;
    }
    .project-card-premium--featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    .project-card-premium--featured .project-card-premium__stage-light {
        aspect-ratio: 16 / 10;
        border-inline-end: 0;
        border-block-end: 1px solid rgba(15, 23, 42, 0.05);
    }
}

.button-sm {
    padding: 8px 18px;
    font-size: 13.5px;
}

/* Fallback placeholder when project has no image */
.project-card-premium__placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #064e3b 100%);
}

.project-card-premium__placeholder--2 {
    background: linear-gradient(135deg, #090d16 0%, #1e3a5f 100%);
}
.project-card-premium__placeholder--3 {
    background: linear-gradient(135deg, #0b1220 0%, #0f3d33 100%);
}
.project-card-premium__placeholder--4 {
    background: linear-gradient(135deg, #1e293b 0%, #047857 100%);
}

.placeholder-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(16, 185, 129, 0.15) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.6;
}

.placeholder-content {
    position: relative;
    z-index: 2;
}
.placeholder-index {
    font-size: 42px;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
    display: block;
    margin-bottom: 4px;
    opacity: 0.9;
}
.placeholder-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    display: block;
    margin-bottom: 6px;
}
.placeholder-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.project-card-premium__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px;
}

.project-card-premium__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.project-category-badge {
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: rgba(16, 185, 129, 0.08);
    color: var(--color-brand-hover);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.project-tech-mini {
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-tech-mini span {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: var(--color-text-muted);
    font-size: 10.5px;
    font-weight: 600;
}

.project-read-hint {
    color: #94a3b8;
    font-size: 12px;
}

.project-impact-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}
.project-impact-chip strong {
    color: #059669;
    font-weight: 700;
}

.project-card-premium__title {
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.38;
    margin-bottom: 6px;
}
.project-card-premium__title a:hover {
    color: var(--color-brand-hover);
}

.project-card-premium__desc {
    color: var(--color-text-muted);
    font-size: 13.5px;
    line-height: 1.58;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-premium__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-block-start: 1px solid rgba(15, 23, 42, 0.06);
}

.project-card-premium__actions .text-link {
    font-size: 13.5px;
}

.project-external-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    color: var(--color-text-muted);
    font-size: 13px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.project-external-btn:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: var(--color-white);
    transform: translateY(-1px);
}

/* ---------- Product (SaaS & ERP) Cards ---------- */
.products-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.product-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: var(--color-white);
    padding: 22px 22px 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s ease,
                border-color 0.28s ease;
}

.product-card::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981 0%, #0ea5e9 100%);
    opacity: 0;
    transform: scaleX(0.35);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.34);
}

.product-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.product-card__badge-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.product-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--color-navy);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.product-status-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--color-brand-hover);
    font-weight: 600;
}
.product-status-dot i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-brand);
    display: inline-block;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.product-year-badge {
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}

.product-card__title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
}
.product-card__title a:hover {
    color: var(--color-brand-hover);
}

.product-card__tagline {
    color: var(--color-brand-hover);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-card__summary {
    color: var(--color-text-muted);
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.product-card__features {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}
.product-card__features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-body);
}
.product-card__features svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--color-brand);
    stroke-width: 2.2;
    flex-shrink: 0;
}

.product-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-block-start: 1px solid rgba(15, 23, 42, 0.06);
}

.product-card__footer .button {
    padding: 9px 18px;
    font-size: 13.5px;
    border-radius: var(--radius-pill);
    flex: 0 0 auto;
}

.product-card__main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card__preview {
    display: none;
}

/* Flagship 2-column Spotlight when there is 1 product in the grid */
.products-grid:has(> .product-card:only-child) .product-card {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 28px;
    align-items: center;
    padding: 26px 28px;
}

.products-grid:has(> .product-card:only-child) .product-card__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    border-radius: 14px;
    background: linear-gradient(145deg, #e2eaf4 0%, #dcf2ea 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    min-height: 260px;
    overflow: hidden;
}

.product-card__preview img {
    width: 100%;
    height: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.product-ui-mock {
    width: 100%;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-ui-mock {
    transform: translateY(-4px);
}

.product-ui-mock__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.product-ui-mock__dots {
    display: inline-flex;
    gap: 4px;
}
.product-ui-mock__dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
}
.product-ui-mock__dots i:first-child { background: #fca5a5; }
.product-ui-mock__dots i:nth-child(2) { background: #fcd34d; }
.product-ui-mock__dots i:nth-child(3) { background: #6ee7b7; }

.product-ui-mock__url {
    font-size: 10.5px;
    font-weight: 600;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.product-ui-mock__pill {
    margin-inline-start: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-brand-hover);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.product-ui-mock__body {
    padding: 14px;
    display: grid;
    gap: 12px;
}

.product-ui-mock__kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.product-ui-mock__kpis > div {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.05);
}
.product-ui-mock__kpis small {
    display: block;
    font-size: 9.5px;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}
.product-ui-mock__kpis strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--color-navy);
}

.product-ui-mock__columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.product-ui-mock__col {
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    background: #f8fafc;
}
.product-ui-mock__col span {
    display: block;
    border-radius: 5px;
}
.product-ui-mock__col span.is-head {
    height: 6px;
    width: 60%;
    background: #cbd5e1;
}
.product-ui-mock__col span.is-card {
    height: 24px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
}
.product-ui-mock__col span.is-card.is-accent {
    border-inline-start: 3px solid var(--color-brand);
}

@media (max-width: 900px) {
    .products-grid:has(> .product-card:only-child) .product-card {
        grid-template-columns: 1fr;
    }
}

.product-card__btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 18px;
    font-size: 14px;
}
.product-card__btn-alt {
    padding: 10px 18px;
    font-size: 14px;
}

/* ---------- Newsletter Popup Modal ---------- */
.newsletter-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.newsletter-modal.is-active {
    opacity: 1;
    pointer-events: auto;
}

.newsletter-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 13, 26, 0.75);
    backdrop-filter: blur(8px);
}

.newsletter-modal__container {
    position: relative;
    z-index: 2;
    width: min(100%, 520px);
    border-radius: 24px;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.65), 0 0 40px rgba(16, 185, 129, 0.15);
    padding: clamp(28px, 6vw, 44px);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.newsletter-modal.is-active .newsletter-modal__container {
    transform: translateY(0) scale(1);
}

.newsletter-modal__close {
    position: absolute;
    inset-block-start: 18px;
    inset-inline-end: 18px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.newsletter-modal__close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}
.newsletter-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.newsletter-modal__art {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 22px;
}

.newsletter-modal__icon {
    position: relative;
    z-index: 2;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.4);
}
.newsletter-modal__icon svg {
    width: 28px;
    height: 28px;
}

.newsletter-modal__content h2 {
    color: #ffffff;
    font-size: clamp(1.4rem, 3.2vw, 1.85rem);
    line-height: 1.25;
    margin-bottom: 10px;
}

.newsletter-modal__content p {
    color: #94a3b8;
    font-size: 14.5px;
    line-height: 1.65;
    margin-bottom: 24px;
}

.newsletter-modal__field-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.newsletter-modal__field-group input {
    flex: 1;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter-modal__field-group input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
}

.newsletter-modal__field-group button {
    padding: 13px 24px;
    font-size: 15px;
    white-space: nowrap;
}

.newsletter-modal__status {
    font-size: 13.5px;
    min-height: 20px;
    margin-bottom: 12px;
}
.newsletter-modal__status.is-success {
    color: #6ee7b7;
    font-weight: 600;
}
.newsletter-modal__status.is-error {
    color: #f87171;
}

.newsletter-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-block-start: 1px solid rgba(255, 255, 255, 0.08);
}

.newsletter-modal__note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 12.5px;
}
.newsletter-modal__note svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.newsletter-modal__dismiss {
    border: none;
    background: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
}
.newsletter-modal__dismiss:hover {
    color: #ffffff;
}

/* ---------- Button Spinner, Flash, Field Errors & WCAG Contrast Enhancements ---------- */
.btn-spinner svg {
    width: 16px;
    height: 16px;
    animation: nuva-spin 0.8s linear infinite;
}

@keyframes nuva-spin {
    to { transform: rotate(360deg); }
}

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

.flash svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: var(--color-danger);
    font-size: 13px;
}

/* WCAG contrast improvements for muted text & placeholder */
.service-bento__index {
    color: #64748b !important;
}

.project-mini-ui__domain,
.product-ui-mock__url {
    color: #64748b !important;
}

.newsletter-modal__field-group input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

@media (max-width: 540px) {
    .newsletter-modal__field-group {
        flex-direction: column;
    }
}
