.cases-page{background:#f8fafc;color:#0f172a;overflow-x:hidden}.cases-wrap{width:min(1180px,calc(100% - 32px));margin:0 auto}.cases-hero{position:relative;overflow:hidden;background:radial-gradient(circle at 15% 10%,rgba(196,154,47,.16),transparent 26%),linear-gradient(135deg,#fff 0%,#f6f9ff 55%,#fff9ea 100%);border-bottom:1px solid #e8edf5;padding:58px 0 38px}.cases-hero:before,.cases-hero:after{content:"";position:absolute;border:2px solid rgba(15,23,42,.05);border-radius:50%;transform:rotate(-18deg)}.cases-hero:before{width:420px;height:180px;right:-120px;top:20px}.cases-hero:after{width:360px;height:140px;left:-110px;bottom:20px}.cases-hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:1.05fr .95fr;gap:36px;align-items:center}.case-kicker{display:inline-flex;align-items:center;gap:8px;background:#fff7df;color:#8a6615;border:1px solid #ead38e;border-radius:999px;padding:8px 14px;font-weight:900}.cases-hero h1{font-size:clamp(32px,4vw,56px);line-height:1.15;margin:16px 0 14px;color:#0f172a;font-weight:1000}.cases-hero p{font-size:17px;line-height:2;color:#334155;margin:0 0 22px}.case-actions{display:flex;flex-wrap:wrap;gap:12px}.case-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;text-decoration:none;border-radius:14px;padding:12px 18px;font-weight:900;cursor:pointer}.case-btn.gold{background:#c49a2f;color:#fff;box-shadow:0 12px 26px rgba(196,154,47,.26)}.case-btn.dark{background:#0f172a;color:#fff}.case-btn.light{background:#fff;color:#0f172a;border:1px solid #e2e8f0}.hero-collage{background:#fff;border:1px solid #e6eaf0;border-radius:34px;padding:16px;box-shadow:0 24px 60px rgba(15,23,42,.12);display:grid;grid-template-columns:repeat(2,1fr);gap:12px;transform:rotate(-1deg)}.hero-collage img{width:100%;height:168px;object-fit:cover;border-radius:24px;background:#f1f5f9}.stats-strip{margin-top:-24px;position:relative;z-index:3}.stats-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}.case-stat{background:#fff;border:1px solid #eadfbf;border-radius:18px;padding:18px;text-align:center;box-shadow:0 16px 40px rgba(15,23,42,.07)}.case-stat strong{display:block;color:#0f172a;font-size:30px;font-weight:1000}.case-stat span{display:block;color:#334155;font-weight:800;margin-top:4px}.case-section{padding:48px 0}.filter-panel,.featured-case,.case-card,.soft-card,.faq-card,.detail-card{background:#fff;border:1px solid #e2e8f0;border-radius:24px;box-shadow:0 18px 48px rgba(15,23,42,.07)}.filter-panel{padding:22px}.section-title{font-size:28px;font-weight:1000;text-align:center;margin:0 0 20px}.filters-grid{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:12px}.filters-grid input,.filters-grid select,.admin-case-form input,.admin-case-form select,.admin-case-form textarea{width:100%;border:1px solid #dbe2ea;border-radius:14px;padding:12px 14px;background:#fff;color:#0f172a;outline:0}.filters-actions{display:flex;gap:10px;margin-top:14px}.featured-case{padding:18px;display:grid;grid-template-columns:1fr 1.15fr;gap:22px;align-items:center}.before-after-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.case-image-box{position:relative;overflow:hidden;border-radius:20px;background:#f1f5f9;border:1px solid #e2e8f0}.case-image-box img{width:100%;height:230px;object-fit:cover;display:block}.case-image-box span{position:absolute;top:10px;background:rgba(15,23,42,.82);color:#fff;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900}.case-image-box .before{right:10px}.case-image-box .after{left:10px}.case-meta{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.case-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;color:#334155;padding:6px 10px;font-size:12px;font-weight:900}.case-chip.gold{background:#fff7df;border-color:#ead38e;color:#8a6615}.featured-case h2,.case-card h3{margin:8px 0;color:#0f172a;font-weight:1000}.featured-case p,.case-card p,.soft-card p{color:#475569;line-height:1.8}.improvements{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.improvements span{background:#ecfdf5;color:#047857;border:1px solid #bbf7d0;border-radius:999px;padding:6px 10px;font-weight:800;font-size:12px}.cases-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.case-card{overflow:hidden}.case-card .thumb{position:relative}.case-card .thumb img{width:100%;height:190px;object-fit:cover;display:block}.case-card .thumb .type{position:absolute;top:10px;left:10px;background:#0f172a;color:#fff;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900}.case-card-body{padding:16px}.case-card h3{font-size:19px;line-height:1.5}.case-card-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px}.empty-state{text-align:center;border:1px dashed #cbd5e1;border-radius:22px;padding:34px;color:#64748b;background:#fff}.pagination-shell{margin-top:22px}.before-after-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.ba-card{background:#fff;border:1px solid #e2e8f0;border-radius:22px;padding:12px;box-shadow:0 12px 34px rgba(15,23,42,.06)}.ba-images{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ba-images img{height:150px;width:100%;object-fit:cover;border-radius:16px;background:#f1f5f9}.testimonials-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.testimonial{padding:18px}.testimonial-head{display:flex;align-items:center;gap:12px}.testimonial img{width:44px;height:44px;border-radius:50%;object-fit:cover;background:#f1f5f9}.stars{color:#c49a2f;letter-spacing:2px}.steps-row{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.step-card{padding:22px;text-align:center}.step-icon{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;margin:0 auto 10px;background:#fff7df;color:#8a6615;font-size:26px;border:1px solid #ead38e}.case-cta{background:#0f172a;color:#fff;border-radius:28px;padding:30px;display:flex;justify-content:space-between;align-items:center;gap:20px;position:relative;overflow:hidden}.case-cta:after{content:"";position:absolute;width:280px;height:120px;border:2px solid rgba(255,255,255,.08);border-radius:50%;left:-80px;bottom:-30px;transform:rotate(-18deg)}.case-cta h2{margin:0 0 8px;font-size:30px}.case-cta p{margin:0;color:#cbd5e1}.faq-list{display:grid;gap:10px}.faq-card{overflow:hidden}.faq-card summary{cursor:pointer;padding:16px 18px;font-weight:1000;list-style:none}.faq-card summary::-webkit-details-marker{display:none}.faq-card p{margin:0;padding:0 18px 18px;color:#475569;line-height:1.9}.case-detail-hero{padding:40px 0 22px;background:linear-gradient(135deg,#fff,#f8fafc)}.detail-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:24px}.detail-card{padding:22px}.detail-card h1{font-size:34px;margin:8px 0}.gallery-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.gallery-grid img{height:150px;width:100%;object-fit:cover;border-radius:18px;background:#f1f5f9}.info-list{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:14px 0}.info-list div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px}.info-list span{display:block;color:#64748b;font-size:12px}.info-list strong{display:block;margin-top:4px}.cases-page .relative.z-0.inline-flex{display:inline-flex;gap:4px}.cases-page nav[role="navigation"]{display:flex;justify-content:center}.cases-page nav[role="navigation"] a,.cases-page nav[role="navigation"] span{border-radius:10px!important}.admin-case-preview{max-width:160px;display:block;border-radius:14px;border:1px solid #e2e8f0;background:#f8fafc;margin-top:8px}@media(max-width:1024px){.cases-hero-grid,.featured-case,.detail-grid{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(3,1fr)}.filters-grid{grid-template-columns:repeat(2,1fr)}.cases-grid,.before-after-grid,.testimonials-grid{grid-template-columns:repeat(2,1fr)}.steps-row{grid-template-columns:repeat(2,1fr)}}@media(max-width:640px){.cases-wrap{width:min(100% - 20px,1180px)}.cases-hero{padding:38px 0 28px}.hero-collage{grid-template-columns:1fr}.hero-collage img{height:140px}.stats-grid,.filters-grid,.cases-grid,.before-after-grid,.testimonials-grid,.steps-row,.info-list,.gallery-grid{grid-template-columns:1fr}.featured-case{padding:12px}.case-cta{display:block;text-align:center}.case-actions,.filters-actions{flex-direction:column}.case-btn{width:100%}.case-image-box img{height:180px}.admin-header{position:relative!important}.admin-content{padding:14px!important}}

/* Before/After required display refinements */
.card-before-after{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:6px;background:#f8fafc;border-bottom:1px solid #e2e8f0;overflow:hidden}.card-ba-image{position:relative;min-height:178px;background:#f1f5f9;overflow:hidden}.card-ba-image img{width:100%;height:100%;min-height:178px;object-fit:cover;display:block}.card-ba-image span,.ba-images div span{position:absolute;top:8px;z-index:2;background:rgba(15,23,42,.84);color:#fff;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:900}.card-ba-image:first-child span,.ba-images div:first-child span{right:8px}.card-ba-image:last-child span,.ba-images div:last-child span{left:8px}.card-before-after .type{position:absolute;top:10px;left:50%;transform:translateX(-50%);background:#0f172a;color:#fff;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900;z-index:3;white-space:nowrap}.ba-images div{position:relative;overflow:hidden;border-radius:16px;background:#f1f5f9}.ba-images div img{height:150px;width:100%;object-fit:cover;display:block}.case-card .thumb{display:none}@media(max-width:640px){.card-ba-image,.card-ba-image img{min-height:150px}.ba-images div img{height:140px}}

/* Responsive Before/After layout: side-by-side on wide/landscape screens, stacked only on narrow portrait screens. */
.cases-page .before-after-pair,
.cases-page .card-before-after,
.cases-page .ba-images{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    align-items:stretch !important;
}
.cases-page .card-before-after{
    border-bottom:1px solid #e2e8f0;
    background:#f8fafc;
}
.cases-page .case-image-box,
.cases-page .card-ba-image,
.cases-page .ba-images > div{
    position:relative;
    overflow:hidden;
    border-radius:18px;
    background:linear-gradient(135deg,#f8fafc,#eef3f8);
    border:1px solid #e2e8f0;
    min-width:0;
}
.cases-page .case-image-box img,
.cases-page .card-ba-image img,
.cases-page .ba-images > div img{
    display:block;
    width:100%;
    height:auto !important;
    aspect-ratio:16/10;
    min-height:0 !important;
    object-fit:contain !important;
    object-position:center center;
    background:linear-gradient(135deg,#f8fafc,#eef3f8);
}
.cases-page .featured-case .case-image-box img,
.cases-page .detail-grid .before-after-pair .case-image-box img{
    aspect-ratio:4/3;
}
.cases-page .card-before-after .type{
    top:10px;
    left:50%;
    transform:translateX(-50%);
    max-width:calc(100% - 24px);
    overflow:hidden;
    text-overflow:ellipsis;
}
@media (min-width:768px), (orientation:landscape){
    .cases-page .before-after-pair,
    .cases-page .card-before-after,
    .cases-page .ba-images{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
}
@media (max-width:900px) and (orientation:portrait){
    .cases-page .before-after-pair,
    .cases-page .card-before-after,
    .cases-page .ba-images{
        grid-template-columns:1fr !important;
    }
    .cases-page .card-before-after .type{
        left:auto;
        right:12px;
        transform:none;
    }
}
@media (max-width:480px){
    .cases-page .before-after-pair,
    .cases-page .card-before-after,
    .cases-page .ba-images{
        grid-template-columns:1fr !important;
    }
}

/* Admin-controlled top cases and statistics enhancements */
.case-stat em{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:12px;background:#fff7df;color:#8a6615;font-style:normal;margin-bottom:8px;font-size:18px}
.top-cases-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-top:16px}
.top-case-mini{display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:10px;text-decoration:none;color:#0f172a;box-shadow:0 10px 28px rgba(15,23,42,.06)}
.top-case-mini strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45;font-weight:1000}
.top-case-mini small{display:block;color:#64748b;font-weight:800;margin-top:5px}.before-after-pair.mini{gap:4px}.before-after-pair.mini .case-image-box{height:70px;min-height:70px}.before-after-pair.mini .case-image-box span{font-size:10px;padding:2px 7px}
@media(max-width:640px){.top-case-mini{grid-template-columns:1fr}.before-after-pair.mini .case-image-box{height:92px}}

/* Admin-managed hero images for /cases */
.cases-hero-images{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
.hero-image-card{position:relative;margin:0;min-width:0;border-radius:24px;overflow:hidden;background:linear-gradient(135deg,#f8fafc,#eef3f8);border:1px solid #e2e8f0;box-shadow:0 12px 28px rgba(15,23,42,.06)}
.hero-image-card img{width:100%;height:168px;object-fit:contain;border-radius:0;background:linear-gradient(135deg,#fff,#f6f9ff);display:block;padding:4px}
.hero-image-card figcaption{position:absolute;left:10px;bottom:10px;background:#0f172a;color:#fff;border-radius:999px;padding:5px 10px;font-size:11px;font-weight:1000;box-shadow:0 8px 18px rgba(15,23,42,.18)}
[dir="rtl"] .hero-image-card figcaption{left:auto;right:10px}
.hero-image-card.is-placeholder{border-style:dashed;border-color:#d7b75a;background:#fffdf6}
.hero-image-placeholder{height:168px;display:grid;place-items:center;text-align:center;color:#8a6615;background:radial-gradient(circle at center,rgba(196,154,47,.12),transparent 60%),linear-gradient(135deg,#fff,#fff7df)}
.hero-image-placeholder span{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:#0f172a;color:#fff;font-weight:1000;letter-spacing:.04em;box-shadow:0 10px 24px rgba(15,23,42,.16)}
.hero-image-placeholder small{display:block;margin-top:-18px;color:#8a6615;font-weight:1000}
@media(max-width:640px){.cases-hero-images{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-image-card img,.hero-image-placeholder{height:118px}.hero-image-card figcaption{font-size:10px;padding:4px 8px}}
@media(max-width:380px){.cases-hero-images{grid-template-columns:1fr}.hero-image-card img,.hero-image-placeholder{height:140px}}

/* Uploaded cases hero images: prevent broken layout and keep four images clear on all screens. */
.cases-hero-images .hero-image-card img{object-fit:cover;object-position:center center;background:#fff;min-width:0;max-width:100%}
.cases-hero-images .hero-image-card figcaption{white-space:nowrap;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis}
@media(max-width:640px){.cases-hero-images .hero-image-card{border-radius:18px}.cases-hero-images .hero-image-card img{height:132px}.cases-hero-grid{overflow-x:hidden}}
@media(max-width:380px){.cases-hero-images .hero-image-card img{height:160px}}
