/* ========================================================
   SERVICE DETAIL PAGE  —  css/service-detail.css
======================================================== */

/* ── Hero ─────────────────────────────────────────────── */
.sd-hero-wrap {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 420px;
    max-height: 700px;
    overflow: hidden;
    background: #000b3c;
}

.sd-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    transition: transform 10s ease;
    z-index: 0;
}

.sd-hero-wrap.loaded .sd-hero-bg {
    transform: scale(1);
}

.sd-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(0, 11, 60, 0.25) 0%,
        rgba(0, 11, 60, 0.55) 45%,
        rgba(0, 11, 60, 0.90) 100%
    );
    z-index: 1;
}

.sd-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 clamp(24px, 7vw, 90px) 52px;
    z-index: 2;
}

.sd-hero-badge {
    display: inline-block;
    background: #00b2ed;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 0;
    margin-bottom: 16px;
}

.sd-hero-title {
    font-size: clamp(2rem, 5.5vw, 4rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.08;
    letter-spacing: -1px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* ── Description section ──────────────────────────────── */
.sd-desc-section {
    background: #fff;
    padding: clamp(48px, 7vw, 90px) clamp(24px, 10vw, 140px);
}

.sd-desc-inner {
    max-width: 860px;
    margin: 0 auto;
    padding-left: 28px;
    border-left: 4px solid #00b2ed;
}

.sd-desc-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #00b2ed;
    margin: 0 0 10px;
}

.sd-desc-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #334155;
    margin: 0;
    white-space: pre-line;
}

/* ── Sub-services section ────────────────────────────── */
.sd-subs-section {
    background: #f1f5f9;
    padding: clamp(56px, 8vw, 100px) clamp(16px, 5vw, 64px);
}

.sd-subs-header {
    text-align: center;
    margin-bottom: 52px;
}

.sd-subs-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.9rem);
    font-weight: 800;
    color: #000b3c;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}

.sd-subs-header p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

.sd-subs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1220px;
    margin: 0 auto;
}

/* ── Sub-service card ────────────────────────────────── */
.sd-sub-card {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #000b3c;
    overflow: hidden;
    border-radius: 12px;
    cursor: default;
    /* --- enter animation state --- */
    opacity: 0;
    transform: translateY(56px) scale(0.97);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease;
}

.sd-sub-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.sd-sub-card:hover {
    box-shadow: 0 24px 56px rgba(0, 11, 60, 0.35);
}

/* Image background */
.sd-sub-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.65s ease;
    z-index: 0;
}

.sd-sub-card:hover .sd-sub-image {
    transform: scale(1.07);
}

/* Gradient veil */
.sd-sub-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 11, 60, 0.00) 15%,
        rgba(0, 11, 60, 0.55) 55%,
        rgba(0, 11, 60, 0.96) 100%
    );
    z-index: 1;
    transition: background 0.4s ease;
}

.sd-sub-card:hover::after {
    background: linear-gradient(
        to bottom,
        rgba(0, 11, 60, 0.08) 0%,
        rgba(0, 11, 60, 0.65) 45%,
        rgba(0, 11, 60, 0.98) 100%
    );
}

/* Info panel */
.sd-sub-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 20px 24px 30px;
    /* --- enter animation state --- */
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.6s ease 0.28s,
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.28s;
}

.sd-sub-card.visible .sd-sub-info {
    opacity: 1;
    transform: translateY(0);
}

/* Price badge */
.sd-sub-price {
    display: inline-block;
    background: #00b2ed;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 0;
    margin-bottom: 10px;
}

/* Title */
.sd-sub-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Description — slides in slightly later */
.sd-sub-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* enter state */
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.45s ease 0.45s,
        opacity    0.45s ease 0.45s;
}

.sd-sub-card.visible .sd-sub-desc {
    max-height: 70px;
    opacity: 1;
}

/* CTA link */
.sd-sub-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #00b2ed;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(0, 178, 237, 0.4);
    padding-bottom: 1px;
    /* enter state */
    opacity: 0;
    transform: translateX(-10px);
    transition:
        opacity   0.4s ease 0.55s,
        transform 0.4s ease 0.55s,
        color 0.2s,
        border-color 0.2s;
}

.sd-sub-card.visible .sd-sub-cta {
    opacity: 1;
    transform: translateX(0);
}

.sd-sub-cta:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}

/* No-image placeholder */
.sd-sub-no-image {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    opacity: 0.2;
    z-index: 0;
}

/* ── CTA section ─────────────────────────────────────── */
.sd-cta-section {
    background: #000b3c;
    padding: clamp(60px, 8vw, 100px) 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sd-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(0,178,237,0.12), transparent);
    pointer-events: none;
}

.sd-cta-section h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    position: relative;
}

.sd-cta-section p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin: 0 0 32px;
    position: relative;
}

.sd-cta-btn {
    display: inline-block;
    background: #00b2ed;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 15px 40px;
    border-radius: 0;
    text-decoration: none;
    position: relative;
    transition: background 0.2s, transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 4px 20px rgba(0, 178, 237, 0.35);
}

.sd-cta-btn:hover {
    background: #0095cc;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 178, 237, 0.45);
}

/* ── No sub-services / error ─────────────────────────── */
.sd-no-subs {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    padding: 40px;
    grid-column: 1 / -1;
}

#svc-error {
    padding: 80px 24px;
    text-align: center;
    color: #ef4444;
    font-size: 1rem;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .sd-subs-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .sd-hero-wrap {
        height: 60vh;
        min-height: 320px;
    }
    .sd-hero-title {
        font-size: 1.9rem;
    }
    .sd-subs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .sd-sub-info {
        padding: 14px 14px 18px;
    }
    .sd-sub-price {
        font-size: 0.58rem;
        padding: 3px 9px;
        margin-bottom: 6px;
    }
    .sd-sub-title {
        font-size: 0.88rem;
        margin-bottom: 4px;
    }
    .sd-sub-desc {
        font-size: 0.72rem;
        line-height: 1.45;
        margin-bottom: 10px;
        -webkit-line-clamp: 3;
    }
    .sd-sub-card.visible .sd-sub-desc {
        max-height: 60px;
    }
    .sd-sub-cta {
        font-size: 0.66rem;
    }
    .sd-sub-no-image {
        font-size: 2rem;
    }
    .sd-desc-inner {
        padding-left: 18px;
    }
}

/* ── Linked sections (team / projects / news) ─────────── */
.sd-linked-section { max-width: 1100px; margin: 0 auto 56px; padding: 0 24px; }
.sd-linked-heading { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 0 0 24px; padding-bottom: 14px; border-bottom: 2px solid #e2e8f0; }
.sd-linked-members { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
.sd-linked-items   { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

/* Project Team cards — photo cards matching the "Meet the Team" style on the home page */
.sd-team-card {
    position: relative;
    flex: 0 0 260px;
    width: 260px;
    height: 360px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #000b3c;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sd-team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.sd-team-media { position: absolute; inset: 0; }

.sd-team-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sd-team-card:hover .sd-team-media img {
    transform: scale(1.06);
}

.sd-team-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0f1a52, #000b3c);
}

.sd-team-noimg span {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.25);
}

.sd-team-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 18px 20px;
    background: linear-gradient(transparent, rgba(0, 11, 60, 0.85));
    transition: opacity 0.25s ease;
}

.sd-team-card:hover .sd-team-caption {
    opacity: 0;
}

.sd-team-caption .sd-team-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.sd-team-hover {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(transparent, rgba(0, 11, 60, 0.94) 55%);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sd-team-card:hover .sd-team-hover {
    transform: translateY(0);
}

.sd-team-hover .sd-team-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.sd-team-role {
    margin: 0;
    font-size: 0.88rem;
    color: #00b2ed;
}

.sd-team-link {
    margin-top: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
}

@media (max-width: 640px) {
    .sd-team-card {
        flex: 1 1 260px;
        width: auto;
        max-width: 320px;
        height: auto;
        aspect-ratio: 3 / 4;
    }
}

/* reuse linked-item-card styles from project-details.css */
.linked-item-card { display:flex;flex-direction:column;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;text-decoration:none;color:inherit;background:#fff;transition:transform .2s,box-shadow .2s,border-color .2s; }
.linked-item-card:hover { transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.09);border-color:rgba(0,178,237,.4); }
.linked-item-thumb { width:100%;height:140px;overflow:hidden;background:#f1f5f9; }
.linked-item-thumb img { width:100%;height:100%;object-fit:cover;transition:transform .3s; }
.linked-item-card:hover .linked-item-thumb img { transform:scale(1.05); }
.linked-item-thumb-placeholder { display:flex;align-items:center;justify-content:center;height:100%;font-size:2rem; }
.linked-item-body { padding:14px 16px;display:flex;flex-direction:column;gap:4px;flex:1; }
.linked-item-type { font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#0284c7; }
.linked-item-title { margin:0;font-size:.88rem;font-weight:700;color:#0f172a;line-height:1.3; }
.linked-item-desc { margin:0;font-size:.75rem;color:#64748b;line-height:1.5; }
.linked-item-cta { font-size:.72rem;font-weight:600;color:#0284c7;margin-top:auto;padding-top:6px; }
