﻿/* =========================================
   ServiceView - Index (Public)
   Theme: Solid black + red accents (NO gradients)
   Match Portfolio style
   Responsive min-width: 320px
   Smooth transitions + SVG-mask icons (no emoji)
   ========================================= */

:root {
    --home-bg: #0b0b0f;
    --home-text: rgba(255,255,255,0.92);
    --home-muted: rgba(255,255,255,0.70);
    --home-border: rgba(255,255,255,0.12);
    --home-border2: rgba(255,255,255,0.18);
    --home-red: #ff2a2a;
    --home-card: rgba(255,255,255,0.04);
    --home-card2: rgba(0,0,0,0.18);
    --home-radius: 18px;
    --home-shadow: 0 18px 55px rgba(0,0,0,0.55);
    --home-shadow2: 0 12px 34px rgba(0,0,0,0.45);
    --home-ease: cubic-bezier(.2,.8,.2,1);
    --home-ease-fast: cubic-bezier(.2,.9,.2,1);
    /* Premium featured border (solid, no gradient) */
    --feat-border: rgba(255,42,42,0.62);
    --feat-border-soft: rgba(255,42,42,0.20);
    /* ✅ Icons (SVG masks) */
    --i-count: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v12H4z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M7 10h10' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M7 14h7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --i-open: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 5h5v5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 14L19 5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M19 14v5H5V5h5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --i-spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l1.8 6.5L20 10l-6.2 1.7L12 18l-1.8-6.3L4 10l6.2-1.5L12 2z' fill='%23000'/%3E%3C/svg%3E");
    --i-badge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 5 6 .8-4.4 4 1.2 6.1L12 15.9 6.2 17.9 7.4 12 3 7.8 9 7z' fill='%23000'/%3E%3C/svg%3E");
    --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --i-empty: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16v10H4z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M7 10h10' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M7 13h7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.svc {
    min-width: 320px;
    color: var(--home-text);
    background: transparent;
    padding: clamp(18px, 3vw, 28px) 0 clamp(46px, 6vw, 74px);
}

.svc__inner {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

@media (max-width:520px) {
    .svc__inner {
        padding-inline: 14px;
    }
}

/* -----------------------------------------
   Hero
----------------------------------------- */
.svc-hero {
    border-radius: var(--home-radius);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--home-border);
    box-shadow: var(--home-shadow2);
    padding: 18px;
    overflow: hidden;
    position: relative;
}

    .svc-hero::after {
        content: "";
        position: absolute;
        right: -70px;
        top: -70px;
        width: 200px;
        height: 200px;
        background: rgba(255,42,42,0.10);
        filter: blur(36px);
        pointer-events: none;
    }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.10);
    transition: transform 220ms var(--home-ease), border-color 220ms var(--home-ease);
    position: relative;
    z-index: 1;
}

    .kicker:hover {
        transform: translateY(-1px);
        border-color: rgba(255,255,255,0.16);
    }

.kicker__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--home-red);
    box-shadow: 0 0 0 4px rgba(255,42,42,0.14);
}

.kicker__text {
    font-weight: 900;
    letter-spacing: .2px;
    font-size: 13px;
    color: rgba(255,255,255,0.88);
}

.svc-hero__title {
    margin: 14px 0 8px;
    font-size: clamp(28px, 4.2vw, 36px);
    letter-spacing: -0.03em;
    line-height: 1.06;
    position: relative;
    z-index: 1;
}

.svc-hero__text {
    margin: 0;
    max-width: 76ch;
    color: var(--home-muted);
    font-size: clamp(13.5px, 1.7vw, 16px);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.svc-metaRow {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    transition: transform 180ms var(--home-ease-fast), border-color 180ms var(--home-ease-fast);
}

    .pill:hover {
        transform: translateY(-1px);
        border-color: rgba(255,255,255,0.18);
    }

.pill__icon {
    --pill-icon: var(--i-count);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255,42,42,0.12);
    border: 1px solid rgba(255,42,42,0.38);
    display: inline-grid;
    place-items: center;
}

    .pill__icon::before {
        content: "";
        width: 12px;
        height: 12px;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--pill-icon) center/contain no-repeat;
        mask: var(--pill-icon) center/contain no-repeat;
    }

.pill__icon--count {
    --pill-icon: var(--i-count);
}

.pill__icon--open {
    --pill-icon: var(--i-open);
}

.pill__text {
    font-size: 13px;
    font-weight: 850;
    color: rgba(255,255,255,0.86);
}

/* -----------------------------------------
   Section head
----------------------------------------- */
.svc-section {
    margin-top: 16px;
}

.svc-section__head {
    margin: 14px 0 12px;
}

.svc-section__title {
    margin: 0;
    font-size: clamp(18px, 2.2vw, 22px);
    letter-spacing: -0.01em;
}

/* -----------------------------------------
   Grid + Cards
----------------------------------------- */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 740px) {
    .svc-grid {
        grid-template-columns: 1fr;
    }
}

/* base card */
.svc-card {
    display: flex;
    flex-direction: column;
    min-height: 272px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--home-border);
    background: rgba(255,255,255,0.04);
    border-radius: var(--home-radius);
    box-shadow: 0 16px 40px rgba(0,0,0,0.30);
    padding: 16px;
    overflow: hidden; /* normal cards keep */
    min-width: 0;
    position: relative;
    isolation: isolate;
    transition: transform 180ms var(--home-ease-fast), border-color 180ms var(--home-ease-fast), background-color 180ms var(--home-ease-fast), box-shadow 180ms var(--home-ease-fast);
    will-change: transform;
}

    /* subtle dotted texture */
    .svc-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        z-index: 0;
        opacity: 0.55;
        background: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 1.5px);
        background-size: 18px 18px;
    }

    /* red corner accent */
    .svc-card::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 84px;
        height: 84px;
        pointer-events: none;
        z-index: 0;
        background: rgba(255,42,42,0.14);
        clip-path: polygon(100% 0, 0 0, 100% 100%);
        opacity: 0.9;
    }

    .svc-card > * {
        position: relative;
        z-index: 1;
    }

    .svc-card:hover {
        transform: translateY(-3px);
        border-color: rgba(255,42,42,0.34);
        background: rgba(255,255,255,0.05);
        box-shadow: 0 24px 70px rgba(0,0,0,0.52);
    }

    .svc-card:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px rgba(255,42,42,0.20), 0 24px 70px rgba(0,0,0,0.52);
        border-color: rgba(255,42,42,0.45);
    }

/* ✅ FEATURED: premium border + inner line (no gradient) */
.svc-card--featured {
    overflow: visible; /* star glow can breathe */
    border-color: var(--feat-border);
    box-shadow: 0 20px 64px rgba(0,0,0,0.58), 0 0 0 1px rgba(255,42,42,0.10) inset, 0 0 0 2px rgba(255,255,255,0.06) inset;
}

    .svc-card--featured::after {
        background: rgba(255,42,42,0.18);
        opacity: 1;
    }

    .svc-card--featured:hover {
        border-color: rgba(255,42,42,0.78);
        box-shadow: 0 28px 86px rgba(0,0,0,0.66), 0 0 0 4px rgba(255,42,42,0.10), 0 0 0 1px rgba(255,42,42,0.10) inset, 0 0 0 2px rgba(255,255,255,0.06) inset;
    }

/* ✅ Featured STAR: top-right corner (one), eye-catchy */
.svc-featureStar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,42,42,0.55);
    box-shadow: 0 14px 28px rgba(0,0,0,0.52), 0 0 0 4px rgba(255,42,42,0.10), 0 0 28px rgba(255,42,42,0.22);
    transform: translateZ(0);
}

    /* inner ring */
    .svc-featureStar::before {
        content: "";
        position: absolute;
        inset: 4px;
        border-radius: inherit;
        border: 1px solid rgba(255,255,255,0.10);
        box-shadow: inset 0 0 0 1px rgba(0,0,0,0.22);
    }

    /* star icon */
    .svc-featureStar::after {
        content: "";
        width: 18px;
        height: 18px;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-spark) center/contain no-repeat;
        mask: var(--i-spark) center/contain no-repeat;
        filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
    }

/* hover pop */
.svc-card--featured:hover .svc-featureStar {
    border-color: rgba(255,42,42,0.78);
    box-shadow: 0 18px 36px rgba(0,0,0,0.60), 0 0 0 5px rgba(255,42,42,0.12), 0 0 36px rgba(255,42,42,0.26);
    transform: translateY(-1px);
}

/* subtle pulse */
@keyframes svcStarPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-1px) scale(1.03);
    }
}

.svc-card--featured .svc-featureStar {
    animation: svcStarPulse 2.6s ease-in-out infinite;
}

/* ✅ Bigger image */
.svc-card__top {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    align-items: start;
    min-width: 0;
}

.svc-card__icon {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.22);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.06);
    transition: transform 180ms var(--home-ease-fast), border-color 180ms var(--home-ease-fast), box-shadow 180ms var(--home-ease-fast);
}

    .svc-card__icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transform: scale(1.03);
        filter: contrast(1.05) saturate(1.04);
        transition: transform 200ms var(--home-ease-fast);
    }

.svc-card:hover .svc-card__icon {
    transform: translateY(-1px);
    border-color: rgba(255,42,42,0.45);
    box-shadow: 0 18px 40px rgba(0,0,0,0.55), 0 0 0 4px rgba(255,42,42,0.10);
}

    .svc-card:hover .svc-card__icon img {
        transform: scale(1.08);
    }

.svc-card__fallback {
    width: 30px;
    height: 30px;
    display: block;
}

    .svc-card__fallback::before {
        content: "";
        width: 30px;
        height: 30px;
        display: block;
        background: rgba(255,255,255,0.90);
        -webkit-mask: var(--i-spark) center/contain no-repeat;
        mask: var(--i-spark) center/contain no-repeat;
    }

.svc-card__meta {
    min-width: 0;
}

.svc-card__titleRow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.svc-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -0.015em;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.svc-card__subtitle {
    margin-top: 6px;
    color: rgba(255,255,255,0.70);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.svc-card__body {
    margin-top: 12px;
    flex: 1 1 auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.svc-card__desc {
    margin: 0;
    color: var(--home-muted);
    font-size: 13.5px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.svc-card__footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 14px;
}

.svc-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.90);
    font-weight: 950;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    transition: transform 160ms var(--home-ease-fast), border-color 160ms var(--home-ease-fast), background-color 160ms var(--home-ease-fast);
}

.svc-link__icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    transition: transform 160ms var(--home-ease-fast);
}

    .svc-link__icon::before {
        content: "";
        width: 16px;
        height: 16px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-arrow) center/contain no-repeat;
        mask: var(--i-arrow) center/contain no-repeat;
    }

.svc-card:hover .svc-link {
    transform: translateY(-1px);
    border-color: rgba(255,42,42,0.32);
    background: rgba(255,42,42,0.10);
}

.svc-card:hover .svc-link__icon {
    transform: translateX(3px);
}

/* -----------------------------------------
   Empty state
----------------------------------------- */
.svc-empty {
    grid-column: 1 / -1;
}

.svc-emptyCard {
    border: 1px dashed rgba(255,255,255,0.18);
    border-radius: var(--home-radius);
    background: rgba(255,255,255,0.03);
    padding: 18px;
    text-align: center;
}

.svc-emptyIcon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 16px;
    background: rgba(255,42,42,0.10);
    border: 1px solid rgba(255,42,42,0.30);
    display: grid;
    place-items: center;
    box-shadow: 0 14px 28px rgba(0,0,0,0.35);
}

    .svc-emptyIcon::before {
        content: "";
        width: 22px;
        height: 22px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-empty) center/contain no-repeat;
        mask: var(--i-empty) center/contain no-repeat;
    }

.svc-emptyTitle {
    font-weight: 950;
    letter-spacing: .2px;
    margin-bottom: 6px;
}

.svc-emptySub {
    color: var(--home-muted);
    font-size: 13px;
}

/* -----------------------------------------
   Reveal
----------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 520ms var(--home-ease), transform 520ms var(--home-ease);
}

    .reveal.is-in {
        opacity: 1;
        transform: translateY(0);
    }

/* ✅ Mobile (320px friendly) */
@media (max-width:420px) {
    .svc-card {
        min-height: 252px;
        padding: 14px;
    }

    .svc-card__top {
        grid-template-columns: 78px 1fr;
        align-items: start;
    }

    .svc-card__icon {
        width: 78px;
        height: 78px;
        border-radius: 16px;
    }

    /* ✅ FIX: মোবাইলে স্টারকে বাইরে নিয়ে গেলাম যাতে টাইটেল ফুল উইডথে থাকে ও overlap না হয় */
    .svc-card--featured .svc-featureStar {
        width: 34px;
        height: 34px;
        top: -10px; /* ✅ outside */
        right: -10px; /* ✅ outside */
        /* glow বজায় থাকবে */
        box-shadow: 0 14px 28px rgba(0,0,0,0.55), 0 0 0 4px rgba(255,42,42,0.10), 0 0 28px rgba(255,42,42,0.22);
    }

        .svc-card--featured .svc-featureStar::after {
            width: 16px;
            height: 16px;
        }
}

/* -----------------------------------------
   Reduced motion
----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .svc-card,
    .pill,
    .kicker,
    .svc-link__icon,
    .reveal {
        transition: none !important;
        animation: none !important;
    }

    .svc-card--featured .svc-featureStar {
        animation: none !important;
    }
}
