/* ============================================================
   CGP Flip Card — Front-end Styles
   File: assets/cgp-card.css
   ============================================================ */

/* ---- Outer wrapper: spacing only, NO overflow here ---- */
.cgp-wrapper {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ---- Clip container: this is what hides the blue card ---- */
.cgp-clip {
    width: 100%;
    overflow: hidden;   /* clips the 200%-wide slider */
    border-radius: 20px; /* matches card radius so shadow isn't cut hard */
}

/* ---- Slider track: two cards side by side ---- */
.cgp-slider {
    display: flex;
    width: 200%;
    transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
}

.cgp-slider.is-shifted {
    transform: translateX(-50%);
}

/* ---- Shared card base ---- */
.cgp-card {
    width: 50%;         /* 50% of 200% track = 100% visible area */
    min-height: 220px;
    border-radius: 20px;
    box-sizing: border-box;
    padding: 28px 24px;
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

/* ---- White card ---- */
.cgp-card--white {
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    justify-content: space-between;
    gap: 12px;
}

.cgp-card__inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* Icon circle */
.cgp-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.cgp-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Title */
.cgp-card__title {
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: #2D5BE3;          /* overridden per-instance via inline style */
    margin: 0 !important;
    padding: 0 !important;
}

/* Divider */
.cgp-card__divider {
    width: 32px;
    height: 2px;
    background: #d0d0d0;
    border-radius: 2px;
    margin: 2px 0;
}

/* Subtitle */
.cgp-card__subtitle {
    font-size: 14px !important;
    font-style: italic;
    font-weight: 600 !important;
    color: #1a1a1a;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* ---- Blue card ---- */
.cgp-card--blue {
    background: #3D6BE8;     /* overridden per-instance via inline style */
    color: #ffffff;
    gap: 16px;
}

.cgp-card--blue .cgp-card__inner {
    justify-content: center;
}

.cgp-card__body {
    font-size: 16px !important;
    line-height: 1.65 !important;
    color: #ffffff !important;
    margin: 0 !important;
    font-weight: 400 !important;
}

/* ---- Arrow buttons ---- */
.cgp-arrow {
    background: none !important;
    border: none !important;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 0 !important;
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    box-shadow: none !important;
}

.cgp-arrow:hover {
    opacity: 0.7;
    transform: scale(1.15);
}

.cgp-arrow:active {
    transform: scale(0.9);
}

.cgp-arrow--right {
    color: #1a1a1a !important;
}

.cgp-arrow--left {
    color: #ffffff !important;
}

/* ---- Small screen tweaks ---- */
@media (max-width: 380px) {
    .cgp-card__title  { font-size: 18px !important; }
    .cgp-card__body   { font-size: 14px !important; }
    .cgp-card         { padding: 20px 16px; min-height: 190px; }
}
