/* ============================================================
   Cardify Pricing Table — Frontend Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@400;500;600;700;800;900&display=swap');

.cardify-pricing-wrap {
    font-family: 'Red Hat Display', system-ui, -apple-system, sans-serif;
    background: var(--cp-section-bg, #f0f4ff);
    padding: 64px 24px 80px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

/* ── Header ── */
.cp-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.cp-title {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
    color: #0d1b2a;
    margin: 0 0 12px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.cp-title-line {
    width: 64px;
    height: 3px;
    background: var(--cp-primary, #1a73e8);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.cp-subtitle {
    font-size: 15px;
    color: #5a6478;
    line-height: 1.65;
    margin-bottom: 28px;
}

/* ── Toggle ── */
.cp-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.cp-toggle-label {
    font-size: 15px;
    font-weight: 600;
    color: #0d1b2a;
}

.cp-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.cp-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cp-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--cp-primary, #1a73e8);
    border-radius: 34px;
    transition: background 0.25s;
}

.cp-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    left: 3px;
    top: 3px;
    transition: transform 0.25s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 2px 5px rgba(0,0,0,.22);
}

.cp-toggle-switch input:checked + .cp-toggle-slider::before {
    transform: translateX(22px);
}

.cp-yearly-note {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--cp-primary, #1a73e8);
    font-style: italic;
    font-weight: 600;
    margin-left: 4px;
}

/* ── Grid ── */
.cp-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 24px;
    max-width: 1060px;
    width: 100%;
    margin: 0 auto;
    align-items: stretch;
    box-sizing: border-box;
}

/* ── Plan Card ── */
.cp-plan-card {
    background: #ffffff;
    border-radius: var(--cp-card-radius, 16px);
    box-shadow: 0 4px 24px rgba(13, 27, 110, 0.07);
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cp-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(13, 27, 110, 0.13);
}

.cp-plan-highlighted {
    background: var(--cp-highlight, #0d1b6e);
    color: #fff;
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(13, 27, 110, 0.30);
    z-index: 2;
}

.cp-plan-highlighted:hover {
    transform: translateY(-14px);
    box-shadow: 0 24px 60px rgba(13, 27, 110, 0.38);
}

/* ── Badge ── */
.cp-badge {
    background: var(--cp-badge, #e53e3e);
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 9px 12px;
    text-transform: uppercase;
}

/* ── Inner ── */
.cp-plan-inner {
    padding: 28px 28px 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Plan top ── */
.cp-plan-name {
    font-size: 20px;
    font-weight: 800;
    color: inherit;
    margin: 0 0 8px;
}

.cp-plan-highlighted .cp-plan-name {
    color: #fff;
}

.cp-plan-desc {
    font-size: 13px;
    color: #6b7a99;
    line-height: 1.5;
    margin: 0 0 20px;
    min-height: 36px;
}

.cp-plan-highlighted .cp-plan-desc {
    color: rgba(255,255,255,0.65);
}

/* ── Price ── */
.cp-price-block {
    margin: 0 0 24px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.cp-price-custom {
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    color: #0d1b2a;
    letter-spacing: -1px;
}

.cp-plan-highlighted .cp-price-custom {
    color: #fff;
}

.cp-price-number {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.cp-currency {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    align-self: flex-start;
    padding-top: 8px;
}

.cp-plan-card:not(.cp-plan-highlighted) .cp-currency {
    color: #0d1b2a;
}

.cp-amount {
    font-size: 50px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    color: #fff;
    transition: opacity 0.25s, transform 0.25s;
}

.cp-plan-card:not(.cp-plan-highlighted) .cp-amount {
    color: #0d1b2a;
}

.cp-price-suffix {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    white-space: nowrap;
    align-self: flex-end;
    padding-bottom: 6px;
}

.cp-plan-card:not(.cp-plan-highlighted) .cp-price-suffix {
    color: #6b7a99;
}

/* ── Features ── */
.cp-features-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.cp-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #3a445a;
    animation: cp-fade-in 0.4s ease both;
}

.cp-plan-highlighted .cp-feature-item {
    color: rgba(255,255,255,0.88);
}

.cp-check-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

@keyframes cp-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ── CTA ── */
.cp-plan-cta {
    margin-top: auto;
    padding-top: 16px;
}

.cp-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.22s, transform 0.18s, box-shadow 0.22s;
    box-sizing: border-box;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.cp-button-primary {
    background: var(--cp-primary, #1a73e8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,115,232,0.28);
}

.cp-button-primary:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,115,232,0.38);
    color: #fff;
}

.cp-button-white {
    background: var(--cp-primary, #1a73e8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,115,232,0.4);
}

.cp-button-white:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,115,232,0.5);
    color: #fff;
}

.cp-button-note {
    text-align: center;
    font-size: 12px;
    margin: 10px 0 0;
    color: #8090b0;
    font-style: italic;
}

.cp-plan-highlighted .cp-button-note {
    color: rgba(255,255,255,0.55);
    font-style: italic;
}

/* ═══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════ */

/* ── Large Desktop (1200px+) ── */
@media ( min-width: 1200px ) {
    .cp-plans-grid {
        max-width: 1120px;
        gap: 0 28px;
    }
    .cp-plan-inner { padding: 32px 32px 36px; }
    .cp-plan-name  { font-size: 22px; }
    .cp-amount     { font-size: 56px; }
    .cp-currency   { font-size: 30px; }
    .cp-price-custom { font-size: 50px; }
    .cp-feature-item { font-size: 14px; gap: 12px; }
    .cp-button     { font-size: 16px; padding: 15px 20px; }
}

/* ── Standard Desktop (1025px – 1199px) ── */
@media ( min-width: 1025px ) and ( max-width: 1199px ) {
    .cp-plans-grid { gap: 0 20px; max-width: 1020px; }
    .cp-plan-inner { padding: 28px 24px 32px; }
}

/* ── Tablet Landscape (769px – 1024px): 3 columns ── */
@media ( min-width: 769px ) and ( max-width: 1024px ) {
    .cardify-pricing-wrap {
        padding: 40px 16px 56px;
        overflow-x: hidden;
    }
    .cp-header { margin-bottom: 36px; max-width: 100%; }
    .cp-plans-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0 10px;
        max-width: 100%;
        width: 100%;
    }
    .cp-plan-highlighted { transform: translateY(-4px); }
    .cp-plan-highlighted:hover { transform: translateY(-8px); }
    .cp-plan-inner { padding: 18px 14px 22px; }
    .cp-plan-name  { font-size: 15px; margin-bottom: 6px; }
    .cp-plan-desc  { font-size: 11.5px; min-height: auto; margin-bottom: 14px; }
    .cp-price-block { margin-bottom: 16px; }
    .cp-amount     { font-size: 34px; letter-spacing: -1px; }
    .cp-currency   { font-size: 18px; padding-top: 5px; }
    .cp-price-custom { font-size: 30px; }
    .cp-price-suffix { font-size: 11px; }
    .cp-features-list { gap: 7px; }
    .cp-feature-item { font-size: 11.5px; gap: 7px; line-height: 1.35; }
    .cp-check-icon svg { width: 13px; height: 13px; }
    .cp-button { font-size: 12px; padding: 10px 8px; border-radius: 7px; letter-spacing: 0; }
    .cp-button-note { font-size: 10.5px; }
    .cp-badge { font-size: 9.5px; padding: 6px 8px; letter-spacing: 0.8px; }
}

/* ── Tablet Portrait (601px – 768px): 3 columns same as desktop ── */
@media ( min-width: 601px ) and ( max-width: 768px ) {
    .cardify-pricing-wrap { padding: 40px 12px 56px; overflow-x: hidden; }
    .cp-header { margin-bottom: 32px; max-width: 100%; }
    .cp-title { font-size: 22px; }
    .cp-subtitle { font-size: 13px; }
    .cp-plans-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0 8px;
        max-width: 100%;
        width: 100%;
    }
    .cp-plan-highlighted { transform: translateY(-4px); }
    .cp-plan-highlighted:hover { transform: translateY(-8px); }
    .cp-plan-inner { padding: 16px 12px 20px; }
    .cp-plan-name  { font-size: 13px; margin-bottom: 5px; }
    .cp-plan-desc  { font-size: 11px; min-height: auto; margin-bottom: 12px; }
    .cp-price-block { margin-bottom: 14px; }
    .cp-amount     { font-size: 28px; letter-spacing: -1px; }
    .cp-currency   { font-size: 15px; padding-top: 4px; }
    .cp-price-custom { font-size: 26px; }
    .cp-price-suffix { font-size: 10px; }
    .cp-features-list { gap: 6px; }
    .cp-feature-item { font-size: 10.5px; gap: 6px; line-height: 1.3; }
    .cp-check-icon svg { width: 12px; height: 12px; }
    .cp-button { font-size: 11px; padding: 9px 6px; border-radius: 7px; letter-spacing: 0; }
    .cp-button-note { font-size: 10px; }
    .cp-badge { font-size: 9px; padding: 6px 8px; letter-spacing: 0.6px; }
}

/* ── Mobile Large (481px – 600px): single column ── */
@media ( min-width: 481px ) and ( max-width: 600px ) {
    .cardify-pricing-wrap { padding: 36px 20px 52px; }
    .cp-header { margin-bottom: 32px; }
    .cp-title { font-size: 22px; }
    .cp-subtitle { font-size: 13px; }
    .cp-plans-grid {
        grid-template-columns: 1fr;
        gap: 20px 0;
        max-width: 460px;
    }
    .cp-plan-highlighted {
        transform: none;
    }
    .cp-plan-highlighted:hover { transform: translateY(-4px); }
    .cp-plan-inner { padding: 24px 22px 28px; }
    .cp-plan-name  { font-size: 19px; }
    .cp-amount     { font-size: 46px; }
    .cp-price-custom { font-size: 42px; }
    .cp-feature-item { font-size: 13.5px; }
}

/* ── Mobile Small (≤ 480px): single column, compact ── */
@media ( max-width: 480px ) {
    .cardify-pricing-wrap { padding: 28px 14px 44px; }
    .cp-header { margin-bottom: 28px; }
    .cp-title { font-size: 20px; letter-spacing: -0.3px; }
    .cp-subtitle { font-size: 13px; }
    .cp-toggle-wrap { gap: 8px; }
    .cp-toggle-label { font-size: 13.5px; }
    .cp-yearly-note { font-size: 12px; }
    .cp-plans-grid {
        grid-template-columns: 1fr;
        gap: 16px 0;
        max-width: 100%;
    }
    .cp-plan-highlighted {
        transform: none;
    }
    .cp-plan-highlighted:hover { transform: translateY(-3px); }
    .cp-plan-inner { padding: 20px 18px 24px; }
    .cp-plan-name  { font-size: 17px; }
    .cp-plan-desc  { font-size: 12.5px; min-height: auto; }
    .cp-amount     { font-size: 40px; letter-spacing: -1.5px; }
    .cp-currency   { font-size: 22px; padding-top: 6px; }
    .cp-price-custom { font-size: 36px; }
    .cp-price-suffix { font-size: 12px; }
    .cp-features-list { gap: 9px; }
    .cp-feature-item { font-size: 13px; }
    .cp-check-icon svg { width: 15px; height: 15px; }
    .cp-button { font-size: 14.5px; padding: 13px 16px; }
    .cp-button-note { font-size: 11.5px; }
    .cp-badge { font-size: 10px; padding: 7px 10px; }
    .cp-plan-card { border-radius: 12px; }
}
