/* ═══════════════════════════════════════════════
   DEV64 – Strony Aplikacji (apps.css)
   Scoped under .app-page to avoid conflicts
   ═══════════════════════════════════════════════ */

:root {
    --blue:       #1566ae;
    --blue-dark:  #0d4a85;
    --blue-brand: #016db6;
    --navy:       #1f2229;
    --text-dark:  #2c4059;
    --text:       #34495e;
    --text-light: #65707d;
    --text-muted: #8a94a0;
    --white:      #ffffff;
    --bg-light:   #f5f7fa;
    --bg-section: #eef2f7;
    --border:     #dde3ec;
    --radius-sm:  5px;
    --radius:     11px;
    --radius-md:  11px;
    --radius-lg:  18px;
    --shadow:     0 4px 20px rgba(21,102,174,0.10);
    --shadow-lg:  0 8px 40px rgba(21,102,174,0.18);
    --max-w:      1120px;
}

/* ── BASE ── */
.app-page { color: var(--text); line-height: 1.6; }
.app-page a { text-decoration: none; color: inherit; transition: color .3s; }
.app-page img { max-width: 100%; display: block; }

/* ── HERO – SUBPAGE ── */
.app-page .hero-sub {
    padding: 7rem 1.5rem 4rem;
    background: var(--navy);
    background-image: linear-gradient(135deg, #0d1520 0%, #152540 60%, #1566ae 100%);
    color: #fff;
}
.app-page .hero-sub-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.app-page .hero-sub .tag {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    padding: .3rem 1rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    color: rgba(255,255,255,.75);
}
.app-page .hero-sub h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -.5px;
    text-align: left;
    color: #fff;
}
.app-page .hero-sub h1 span { color: #5ab4ff; }
.app-page .hero-sub p {
    font-size: 1rem;
    font-weight: 300;
    opacity: .85;
    max-width: 640px;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    color: #fff;
}
.app-page .hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: .5rem;
}
.app-page .stat-num {
    font-size: 2rem;
    font-weight: 900;
    color: #5ab4ff;
    line-height: 1;
}
.app-page .stat-label {
    font-size: .7rem;
    font-weight: 400;
    opacity: .65;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: .25rem;
    color: #fff;
}
.app-page .breadcrumb {
    margin-bottom: 1.5rem;
    font-size: .78rem;
    color: rgba(255,255,255,.55);
}
.app-page .breadcrumb a { color: rgba(255,255,255,.7); }
.app-page .breadcrumb a:hover { color: #fff; }
.app-page .breadcrumb .sep { margin: 0 .5rem; }

/* ── INTEGRATION BANNER ── */
.app-page .int-banner { border-bottom: 3px solid; }
.app-page .int-banner.symfonia { background: #fff8e1; border-color: #f9a825; }
.app-page .int-banner.optima   { background: #e8f5e9; border-color: #2e7d32; }
.app-page .int-banner-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.app-page .int-banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.app-page .int-banner p { font-size: .9rem; line-height: 1.55; flex: 1; margin: 0; }
.app-page .int-banner.symfonia p { color: #5c3a00; }
.app-page .int-banner.optima   p { color: #1b5e20; }
.app-page .int-banner strong { font-weight: 700; }
.app-page .int-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1.5px solid;
    border-radius: 8px;
    padding: .4rem .9rem;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.app-page .int-banner.symfonia .int-badge { background: #fff; border-color: #f9a825; color: #bf360c; }
.app-page .int-banner.optima   .int-badge { background: #fff; border-color: #2e7d32; color: #1b5e20; }

/* ── PAGE CONTENT WRAPPER ── */
.app-page .page-content {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── SECTIONS ── */
.app-page .section { padding: 2rem 0; }
.app-page .section + .section { border-top: 1px solid var(--border); }
.app-page .section-bg { background: var(--bg-light); }
.app-page .section-dark { background: var(--navy); color: #fff; }
.app-page .section-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--blue);
    margin-bottom: .5rem;
}
.app-page .section-dark .section-label { color: #5ab4ff; }
.app-page .section h2,
.app-page h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-dark);
    margin-bottom: .75rem;
    letter-spacing: -.3px;
    text-align: left;
    line-height: 1.2;
}
.app-page h3 { color: var(--text-dark); }
.app-page h4 { color: var(--text-dark); }
.app-page p  { color: var(--text); }
.app-page .section-dark h2,
.app-page .section-dark h3,
.app-page .section-dark h4,
.app-page .section-dark p { color: #fff; }
.app-page .section-intro {
    font-size: .95rem;
    font-weight: 300;
    color: var(--text-light);
    max-width: 680px;
    line-height: 1.75;
    margin-bottom: 2rem;
}
.app-page .section-dark .section-intro { color: rgba(255,255,255,.7); }

/* ── ARCH GRID (overview cards) ── */
.app-page .arch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}
.app-page .arch-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--blue);
}
.app-page .arch-card h4 {
    font-size: .82rem;
    font-weight: 800;
    color: var(--blue-brand);
    margin-bottom: .25rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.app-page .arch-card .tech {
    font-size: .72rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: .5rem;
}
.app-page .arch-card p {
    font-size: .8rem;
    color: var(--text-light);
    line-height: 1.45;
    margin: 0;
}

/* ── SYNC COLS ── */
.app-page .sync-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.app-page .sync-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.app-page .sync-box h4 {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 1rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-dark);
}
.app-page .sync-box.from h4 { color: #2e7d32; }
.app-page .sync-box.to   h4 { color: var(--blue); }
.app-page .sync-box ul { list-style: none; padding: 0; margin: 0; }
.app-page .sync-box ul li {
    font-size: .85rem;
    color: var(--text-light);
    padding: .5rem 0;
    border-bottom: 1px solid #f0f2f6;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    line-height: 1.4;
}
.app-page .sync-box ul li:last-child { border-bottom: none; }
.app-page .sync-box.from ul li::before { content:'↓'; color:#2e7d32; font-weight:800; flex-shrink:0; }
.app-page .sync-box.to   ul li::before { content:'↑'; color:var(--blue); font-weight:800; flex-shrink:0; }

/* ── MODULES GRID ── */
.app-page .modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.app-page .module-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    transition: transform .2s, box-shadow .2s;
}
.app-page .module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.app-page .module-card-icon { font-size: 1.6rem; margin-bottom: .6rem; }
.app-page .module-card h3,
.app-page .module-card h4 {
    font-size: .88rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--blue-dark);
    letter-spacing: .2px;
    line-height: 1.2;
    margin-bottom: .5rem;
}
.app-page .module-card p {
    font-size: .82rem;
    font-weight: 300;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}
.app-page .module-card.dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.app-page .module-card.dark h3,
.app-page .module-card.dark h4 { color: #5ab4ff; }
.app-page .module-card.dark p { color: rgba(255,255,255,.7); }

/* Module card with head/body (original style) */
.app-page .module-head {
    background: rgba(21,102,174,.07);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-bottom: 2px solid rgba(21,102,174,.12);
    margin: -1.25rem -1.5rem .75rem;
}
.app-page .module-head .module-icon { font-size: 1.4rem; flex-shrink: 0; }
.app-page .module-head h3 {
    font-size: .88rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--blue-dark);
    letter-spacing: .2px;
    line-height: 1.2;
    margin: 0;
}
.app-page .module-body { }
.app-page .module-body ul { list-style: none; padding: 0; margin: 0; }
.app-page .module-body ul li {
    font-size: .82rem;
    font-weight: 300;
    color: var(--text-light);
    padding: .4rem 0;
    border-bottom: 1px solid #f2f4f8;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    line-height: 1.4;
}
.app-page .module-body ul li:last-child { border-bottom: none; }
.app-page .module-body ul li::before { content: '✓'; color: var(--blue); font-weight: 800; font-size: .72rem; flex-shrink: 0; margin-top: .15rem; }
.app-page .module-sub {
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--blue);
    margin: .85rem 0 .4rem;
}

/* ── WIDE MODULE ── */
.app-page .module-wide {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 1.25rem;
}
.app-page .module-wide .module-head { margin: 0; padding: 1.1rem 1.75rem; }
.app-page .module-wide-body {
    padding: 1.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
}
.app-page .mw-group h4 {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-dark);
    margin-bottom: .75rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid rgba(21,102,174,.15);
}
.app-page .mw-group ul { list-style: none; padding: 0; margin: 0; }
.app-page .mw-group ul li {
    font-size: .82rem;
    font-weight: 300;
    color: var(--text-light);
    padding: .35rem 0;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    line-height: 1.4;
}
.app-page .mw-group ul li::before { content:'→'; color:var(--blue); font-size:.72rem; flex-shrink:0; margin-top:.15rem; }

/* ── MODULE LAYOUT (screenshot + text) ── */
.app-page .module-layout {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 2rem;
    align-items: start;
}
.app-page .module-layout.reverse { direction: rtl; }
.app-page .module-layout.reverse > * { direction: ltr; }
.app-page .module-screenshot img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.app-page .module-screenshot img:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.app-page .module-desc h4 {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--blue);
    margin-bottom: .5rem;
    margin-top: 0;
}
.app-page .feature-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.app-page .feature-list li {
    padding: .45rem 0 .45rem 1.3rem;
    font-size: .88rem;
    font-weight: 300;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    position: relative;
    line-height: 1.5;
}
.app-page .feature-list li:last-child { border-bottom: none; }
.app-page .feature-list li::before { content: '→'; position: absolute; left: 0; color: var(--blue); font-size: .75rem; }

/* ── FEATURE CARDS ── */
.app-page .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}
.app-page .feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    border: 1px solid var(--border);
    border-top: 3px solid var(--blue);
}
.app-page .feature-icon { font-size: 1.35rem; flex-shrink: 0; line-height: 1; margin-top: .1rem; }
.app-page .feature-card h4 {
    font-size: .83rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dark);
    margin-bottom: .3rem;
}
.app-page .feature-card p { font-size: .79rem; font-weight: 300; color: var(--text-light); line-height: 1.5; margin: 0; }

/* ── ROLES GRID ── */
.app-page .roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.app-page .role-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue);
}
.app-page .role-card h4 {
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--blue-dark);
    margin-bottom: .75rem;
}
.app-page .role-card ul { list-style: none; padding: 0; margin: 0; }
.app-page .role-card ul li {
    font-size: .8rem;
    font-weight: 300;
    color: var(--text-light);
    padding: .3rem 0;
    border-bottom: 1px solid var(--border);
}
.app-page .role-card ul li:last-child { border-bottom: none; }

/* ── PRINT GRID ── */
.app-page .print-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 1rem;
}
.app-page .print-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.app-page .print-card h4 { font-size: .84rem; font-weight: 700; color: var(--text-dark); margin-bottom: .25rem; }
.app-page .print-card p { font-size: .78rem; font-weight: 300; color: var(--text-light); line-height: 1.4; margin: 0; }

/* ── TECH REQS ── */
.app-page .tech-reqs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1rem;
}
.app-page .tech-req {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.app-page .tech-req .label {
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--blue);
    margin-bottom: .3rem;
}
.app-page .tech-req .value { font-size: .87rem; font-weight: 600; color: var(--text-dark); }

/* ── REQUIREMENTS TABLE (dark) ── */
.app-page .req-table-wrap { overflow-x: auto; }
.app-page .req-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.app-page .req-table th,
.app-page .req-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.1); }
.app-page .req-table th { font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: #5ab4ff; }
.app-page .req-table td { font-weight: 300; color: rgba(255,255,255,.8); }
.app-page .req-table tr:last-child td { border-bottom: none; }

/* ── GALLERY ── */
.app-page .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.app-page .gallery-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform .22s, box-shadow .22s;
}
.app-page .gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.app-page .gallery-item img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    object-position: top left;
    display: block;
    border-bottom: 1px solid var(--border);
}
.app-page .gallery-item .cap { padding: .85rem 1rem; }
.app-page .gallery-item .cap h5 { font-size: .83rem; font-weight: 700; color: var(--text-dark); margin-bottom: .2rem; text-transform: uppercase; letter-spacing: .2px; }
.app-page .gallery-item .cap p { font-size: .76rem; font-weight: 300; color: var(--text-light); line-height: 1.4; margin: 0; }
.app-page .lb-thumb { cursor: pointer; transition: transform .2s, box-shadow .2s; }
.app-page .lb-thumb:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* Gallery plain (only images, no caption) */
.app-page .gallery > img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;
    height: 190px;
    object-fit: cover;
    object-position: top left;
    cursor: pointer;
    transition: transform .22s, box-shadow .22s;
}
.app-page .gallery > img:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ── BUTTONS ── */
.app-page .btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border-radius: var(--radius);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: all .25s;
    cursor: pointer;
    text-decoration: none;
}
.app-page .btn-primary {
    background: var(--blue);
    color: #fff !important;
    border: 2px solid var(--blue);
}
.app-page .btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.app-page .btn-outline {
    background: transparent;
    color: var(--blue) !important;
    border: 2px solid var(--blue);
}
.app-page .btn-outline:hover { background: var(--blue); color: #fff !important; }
.app-page .btn-secondary {
    background: transparent;
    color: var(--blue) !important;
    border: 2px solid var(--blue);
}
.app-page .btn-secondary:hover { background: var(--blue); color: #fff !important; }

/* ── CTA section ── */
.app-page .cta-section { text-align: center; background: var(--bg-light); }

/* ── LIGHTBOX ── */
.lb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13,20,32,.93);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}
.lb-overlay.active { display: flex; }
.lb-overlay .lb-img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 8px;
    box-shadow: 0 0 80px rgba(0,0,0,.7);
    object-fit: contain;
}
.lb-close, .lb-prev, .lb-next {
    position: fixed;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: background .2s;
    line-height: 1;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 1.25rem; right: 1.75rem; font-size: 1.5rem; }
.lb-prev  { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1.25rem; top: 50%; transform: translateY(-50%); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .app-page .sync-cols { grid-template-columns: 1fr; }
    .app-page .module-wide-body { grid-template-columns: 1fr; }
    .app-page .module-layout { grid-template-columns: 1fr; }
    .app-page .module-layout.reverse { direction: ltr; }
}
@media (max-width: 600px) {
    .app-page .hero-sub { padding: 6rem 1rem 3rem; }
    .app-page .gallery { grid-template-columns: 1fr 1fr; }
    .app-page .arch-grid { grid-template-columns: 1fr 1fr; }
    .lb-prev, .lb-next { display: none; }
}

/* ── Comarch overview – kompaktowe sekcje ── */
.app-page .section.comarch-section { padding: 1.5rem 0 !important; }
.app-page .section.comarch-section + .section.comarch-section { border-top: 1px solid var(--border); }
