/* ═══════════════════════════════════════════════════════════
   CodeTodo Service Cards — Frontend CSS
   Prefix: ctsc-
   Mirrors React ServicesSection 100%
   ═══════════════════════════════════════════════════════════ */

/* ── Google Font (fallback — main enqueue is in plugin PHP) ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ─────────────────────────────────────────────────────────────
   SECTION WRAP
───────────────────────────────────────────────────────────── */
.ctsc-wrap {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   AURORA BACKGROUND EFFECTS
───────────────────────────────────────────────────────────── */
.ctsc-top-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at 50% 0%, rgba(26,127,232,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ctsc-aurora {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.ctsc-aurora-1 {
    top: -120px;
    left: -80px;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(26,127,232,0.18) 0%, transparent 65%);
    filter: blur(70px);
    animation: ctsc-aurora-1 18s ease-in-out infinite;
}

.ctsc-aurora-2 {
    bottom: -100px;
    right: -60px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(124,58,237,0.16) 0%, transparent 65%);
    filter: blur(60px);
    animation: ctsc-aurora-2 22s ease-in-out infinite 3s;
}

.ctsc-aurora-3 {
    top: 40%;
    right: 8%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 65%);
    filter: blur(50px);
    animation: ctsc-aurora-3 14s ease-in-out infinite 1s;
}

.ctsc-beam-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ctsc-beam {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -260px;
    width: 200px;
    background: linear-gradient(90deg, transparent, rgba(26,127,232,0.07), transparent);
    animation: ctsc-beam-sweep 12s linear infinite 4s;
}

@keyframes ctsc-aurora-1 {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%       { transform: translate(40px,-30px) scale(1.05); }
    66%       { transform: translate(-20px,20px) scale(0.95); }
}
@keyframes ctsc-aurora-2 {
    0%, 100% { transform: translate(0,0) scale(1); }
    40%       { transform: translate(-50px,30px) scale(1.08); }
    70%       { transform: translate(30px,-20px) scale(0.96); }
}
@keyframes ctsc-aurora-3 {
    0%, 100% { transform: translate(0,0) scale(1); }
    50%       { transform: translate(25px,25px) scale(1.1); }
}
@keyframes ctsc-beam-sweep {
    0%   { left: -260px; }
    100% { left: 110%; }
}

/* ─────────────────────────────────────────────────────────────
   INNER CONTAINER
───────────────────────────────────────────────────────────── */
.ctsc-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────
   SECTION HEADER
───────────────────────────────────────────────────────────── */
.ctsc-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.ctsc-header-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctsc-label-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ctsc-header-label span:last-child {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ctsc-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* ─────────────────────────────────────────────────────────────
   CARDS LIST
───────────────────────────────────────────────────────────── */
.ctsc-cards-list {
    display: flex;
    flex-direction: column;
}

/* ─────────────────────────────────────────────────────────────
   INDIVIDUAL CARD
───────────────────────────────────────────────────────────── */
.ctsc-card {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    box-sizing: border-box;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.35s ease, border 0.3s ease, transform 0.25s ease;
    cursor: default;
}

/* Shine overlay — moved by JS on mousemove */
.ctsc-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

/* Top gradient bar — scales in on hover */
.ctsc-card-top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    opacity: 0.8;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.ctsc-card:hover .ctsc-card-top-bar {
    transform: scaleX(1);
}

/* ─────────────────────────────────────────────────────────────
   CARD BODY — Two-column grid
───────────────────────────────────────────────────────────── */
.ctsc-card-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
    min-height: 420px;
    position: relative;
    z-index: 1;
}

/* ── Left Panel ── */
.ctsc-card-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 200px;
}

.ctsc-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ctsc-card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ctsc-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.ctsc-card-desc {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    margin: 20px 0 0;
}

/* ── Right Panel: Service List ── */
.ctsc-service-list {
    display: flex;
    flex-direction: column;
}

/* ─────────────────────────────────────────────────────────────
   SERVICE ROW
───────────────────────────────────────────────────────────── */
.ctsc-service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Last visible row — remove bottom border */
.ctsc-service-row:last-of-type,
.ctsc-service-row.ctsc-last-visible {
    border-bottom: none;
}

/* Icon box */
.ctsc-svc-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}
.ctsc-svc-icon-wrap svg {
    display: block;
}

/* Name */
.ctsc-svc-name {
    flex: 1;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}

/* Chevron */
.ctsc-svc-chevron {
    flex-shrink: 0;
    transition: stroke 0.2s ease, transform 0.2s ease;
}

/* Hover state — driven by JS to use dynamic colors */
.ctsc-service-row:hover .ctsc-svc-chevron {
    transform: translateX(2px);
}

/* Hidden rows (shown after View All click) */
.ctsc-row-hidden {
    display: none;
}

/* ─────────────────────────────────────────────────────────────
   LIST FOOTER (View All + Badge)
───────────────────────────────────────────────────────────── */
.ctsc-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #F1F5F9;
    margin-top: 4px;
}

.ctsc-view-all-btn {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}
.ctsc-view-all-btn:hover {
    color: #1A7FE8;
}

.ctsc-view-all-chevron {
    transition: transform 0.25s ease;
}
.ctsc-view-all-btn[aria-expanded="true"] .ctsc-view-all-chevron {
    transform: rotate(180deg);
}

/* Count badge */
.ctsc-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: #EFF6FF;
    border: 1px solid;
}
.ctsc-count-badge span:last-child {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
}
.ctsc-count-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   CTA PILL
───────────────────────────────────────────────────────────── */
.ctsc-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ctsc-cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 6px 28px 6px 6px;
    border-radius: 9999px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(26,127,232,0.45), 0 0 0 1px rgba(255,255,255,0.08) inset;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ctsc-cta-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(26,127,232,0.55), 0 0 0 1px rgba(255,255,255,0.10) inset;
}
.ctsc-cta-pill:focus-visible {
    outline: 2px solid #60A5FA;
    outline-offset: 3px;
}

.ctsc-cta-avatars {
    display: flex;
    align-items: center;
}

.ctsc-cta-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
    position: relative;
}

.ctsc-cta-text-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ctsc-cta-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ctsc-cta-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ctsc-cta-sublabel {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.02em;
    text-align: center;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
───────────────────────────────────────────────────────────── */

/* Tablet: 640px – 1023px */
@media (max-width: 1023px) {
    .ctsc-inner {
        padding: 0 40px;
    }
    .ctsc-header {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .ctsc-card-body {
        grid-template-columns: 180px 1fr;
        gap: 28px;
        min-height: auto;
    }
    .ctsc-card-title {
        font-size: 22px !important;
    }
}

/* Mobile: below 640px */
@media (max-width: 639px) {
    .ctsc-inner {
        padding: 0 16px;
    }

    /* Header stacks */
    .ctsc-header {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Card: single column */
    .ctsc-card-body {
        grid-template-columns: 1fr;
        gap: 20px;
        min-height: auto;
    }

    /* Left panel: row layout on mobile */
    .ctsc-card-left {
        min-height: auto;
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0;
    }
    .ctsc-card-title-row {
        width: 100%;
        margin-bottom: 6px;
    }
    .ctsc-card-desc {
        margin-top: 0;
        font-size: 13px !important;
    }

    /* Tighter service rows */
    .ctsc-service-row {
        padding: 14px 0;
    }

    /* CTA full width on mobile */
    .ctsc-cta-pill {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
        gap: 10px;
    }
    .ctsc-cta-avatars {
        display: none; /* hide avatars on small mobile */
    }
}
