/* MHAG web applications showcase */
.web-apps-section {
    background: linear-gradient(180deg, #edf5f9 0%, #f8fbfc 100%);
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.web-apps-section::before {
    content: "";
    background: radial-gradient(circle, #226da51a 1.5px, transparent 1.6px);
    background-size: 22px 22px;
    width: 390px;
    height: 390px;
    position: absolute;
    top: -180px;
    left: -100px;
    opacity: .65;
}

.web-apps-section > .container { position: relative; }
.web-apps-heading { align-items: end; }

.web-app-featured {
    background: var(--navy-deep);
    color: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
    align-items: center;
    gap: 64px;
    padding: 58px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 28px 65px #0324352e;
}

.web-app-featured::after {
    content: "";
    border: 1px solid #ffffff12;
    border-radius: 50%;
    width: 430px;
    height: 430px;
    position: absolute;
    right: -250px;
    bottom: -275px;
}

.web-app-copy { z-index: 1; position: relative; }
.web-app-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.web-app-badges span {
    color: #bcd5e3;
    border: 1px solid #ffffff2b;
    background: #ffffff0d;
    padding: 5px 11px;
    font-size: 10px;
    font-weight: 700;
}
.web-app-badges .is-ready { color: #d8ffed; border-color: #41d49755; background: #0aaa6730; }
.web-app-copy h3 { letter-spacing: -.02em; margin: 0 0 14px; font-size: clamp(30px, 3.2vw, 47px); line-height: 1.35; }
.web-app-copy > p { color: #ffffffb0; max-width: 610px; margin: 0; font-size: 15px; line-height: 2; }

.web-app-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 22px;
    margin: 25px 0 29px;
    padding: 0;
    list-style: none;
}
.web-app-features li { color: #e5f0f5; padding-right: 22px; font-size: 12px; line-height: 1.75; position: relative; }
.web-app-features li::before { content: "✓"; color: #4cdda1; font-weight: 700; position: absolute; right: 0; }
.web-app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 25px; }
.web-app-actions .project-link { color: #fff; border-color: #ffffff40; }
.web-app-actions .project-link:hover { border-color: #fff; }

.web-app-preview { min-height: 430px; display: grid; place-items: center; position: relative; perspective: 1200px; }
.app-preview-window {
    background: #f8fbfd;
    border: 1px solid #ffffff4a;
    width: min(100%, 590px);
    transform: rotateY(-5deg) rotateX(2deg);
    transform-origin: center;
    box-shadow: 0 35px 75px #00000052;
}
.app-preview-topbar { background: #fff; color: #173c50; direction: rtl; display: flex; align-items: center; height: 34px; padding: 0 14px; font-size: 9px; font-weight: 700; }
.app-preview-topbar span { margin-left: auto; }
.app-preview-topbar i { background: #d1dce2; border-radius: 50%; width: 6px; height: 6px; margin-right: 5px; display: block; }
.app-preview-topbar i:last-child { background: #18b875; }
.app-preview-body { direction: rtl; display: grid; grid-template-columns: 64px 1fr; min-height: 325px; }
.app-preview-sidebar { background: #08374b; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 16px 11px; }
.app-preview-sidebar b { border-bottom: 1px solid #ffffff24; width: 100%; padding-bottom: 13px; text-align: center; font-size: 10px; }
.app-preview-sidebar span { background: #ffffff38; border-radius: 8px; width: 31px; height: 5px; display: block; }
.app-preview-sidebar span.active { background: #21c47d; width: 38px; height: 7px; }
.app-preview-content { padding: 22px; }
.app-preview-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.app-preview-title b { color: #193d50; font-size: 11px; }
.app-preview-title span { background: #dbe7ed; width: 70px; height: 7px; display: block; }
.app-preview-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.app-preview-metrics span { border-top: 3px solid #277fb9; background: #fff; height: 54px; display: block; box-shadow: 0 5px 14px #12394f0f; }
.app-preview-metrics span:nth-child(2) { border-color: #18aa70; }
.app-preview-metrics span:nth-child(3) { border-color: #7059cb; }
.app-preview-metrics span:nth-child(4) { border-color: #ed9b23; }
.app-preview-chart { background: #fff; direction: ltr; display: flex; align-items: end; gap: 8px; height: 115px; margin-top: 12px; padding: 18px 23px; box-shadow: 0 5px 14px #12394f0f; }
.app-preview-chart i { background: linear-gradient(180deg, #2e89c5, #78b9df); width: 12%; height: 24%; display: block; }
.app-preview-chart i:nth-child(2) { height: 61%; }
.app-preview-chart i:nth-child(3) { height: 43%; }
.app-preview-chart i:nth-child(4) { height: 81%; background: linear-gradient(180deg, #18aa70, #70dab0); }
.app-preview-chart i:nth-child(5) { height: 54%; }
.app-preview-chart i:nth-child(6) { height: 70%; }
.app-preview-table { background: #fff; margin-top: 12px; padding: 12px 14px; box-shadow: 0 5px 14px #12394f0f; }
.app-preview-table span { border-bottom: 1px solid #e7eef2; width: 100%; height: 12px; display: block; }

.device-chip { border: 1px solid #ffffff35; background: #ffffff14; color: #fff; backdrop-filter: blur(10px); padding: 8px 13px; font-size: 10px; font-weight: 700; position: absolute; box-shadow: 0 8px 22px #0003; }
.device-chip::before { content: ""; border: 2px solid #5ee0a5; border-radius: 3px; width: 10px; height: 14px; margin-left: 7px; vertical-align: -3px; display: inline-block; }
.device-chip-mobile { right: 0; bottom: 29px; }
.device-chip-laptop { left: 2px; top: 27px; }
.device-chip-laptop::before { border-radius: 2px; width: 17px; height: 11px; }

.web-apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.web-app-card { border: 1px solid var(--line); background: #fff; min-height: 300px; padding: 30px; position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.web-app-card:hover { border-color: #b6d3e3; transform: translateY(-4px); box-shadow: 0 20px 40px #12394f12; }
.web-app-card-icon { background: #e7f3fa; direction: ltr; display: flex; align-items: end; gap: 4px; width: 52px; height: 52px; padding: 13px; }
.web-app-card-icon span { background: #277fb9; width: 7px; height: 13px; display: block; }
.web-app-card-icon span:nth-child(2) { height: 24px; }
.web-app-card-icon span:nth-child(3) { height: 18px; }
.web-app-card-icon.is-project { background: #e7f7f0; }
.web-app-card-icon.is-project span { background: #0aaa67; border-radius: 50%; width: 8px; height: 8px; }
.web-app-card-icon.is-project span:nth-child(2) { border-radius: 0; width: 19px; height: 3px; margin-bottom: 3px; }
.web-app-card-icon.is-project span:nth-child(3) { display: none; }
.web-app-card-status { color: #0b8855; border: 1px solid #bfe9d5; background: #effaf5; padding: 4px 8px; font-size: 9px; font-weight: 700; position: absolute; top: 31px; left: 30px; }
.web-app-card h3 { color: var(--navy); margin: 30px 0 9px; font-size: 21px; }
.web-app-card p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.9; }
.web-app-card > a:not(.button) { color: var(--blue); border-bottom: 1px solid #226da54d; margin-top: 24px; padding-bottom: 3px; font-size: 12px; font-weight: 700; display: inline-block; }
.web-app-card-cta { background: linear-gradient(145deg, #f2f8fb, #e8f4f8); display: flex; flex-direction: column; justify-content: center; }
.web-app-card-cta h3 { margin: 9px 0; }
.web-app-card-cta .button { align-self: flex-start; margin-top: 20px; }
.web-apps-footer { border-top: 1px solid #cedde5; display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 34px; padding-top: 28px; }
.web-apps-footer p { color: var(--muted); margin: 0; font-size: 13px; }
.web-apps-footer strong { color: var(--navy); }

@media (max-width: 980px) {
    .web-app-featured { grid-template-columns: 1fr; gap: 25px; }
    .web-app-preview { order: 2; min-height: 390px; }
    .web-apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .web-app-card-cta { grid-column: span 2; }
}

@media (max-width: 680px) {
    .web-app-featured { padding: 34px 22px; }
    .web-app-features { grid-template-columns: 1fr; }
    .web-app-preview { min-height: 280px; }
    .app-preview-window { transform: none; }
    .app-preview-body { grid-template-columns: 45px 1fr; min-height: 230px; }
    .app-preview-sidebar { padding: 12px 7px; }
    .app-preview-sidebar span { width: 24px; }
    .app-preview-content { padding: 13px; }
    .app-preview-metrics { grid-template-columns: repeat(2, 1fr); }
    .app-preview-metrics span { height: 38px; }
    .app-preview-chart { height: 75px; padding: 12px; }
    .app-preview-table, .device-chip { display: none; }
    .web-apps-grid { grid-template-columns: 1fr; }
    .web-app-card-cta { grid-column: auto; }
    .web-apps-footer { flex-direction: column; align-items: flex-start; }
    .web-app-actions { align-items: stretch; }
    .web-app-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .web-app-card { transition: none; }
}
