/* modern-ms.css — Purple & Gold microsite theme
   Only loaded for domains with modern design flag. */

:root {
    --accent: #4A1D8E;
    --accent-light: #5E2BAD;
    --accent-bg: #F4F0FA;
    --gold: #C9A84C;
    --lifecycle-hover: #F9F6FD;
    --trust-bg: linear-gradient(135deg, #4A1D8E 0%, #6B3AC2 100%);
}

/* ── Reset for modern sections ── */
.ms-modern {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: #1d1d1f;
    line-height: 1.5;
    background: #f5f5f7;
    padding-top: 20px;
    padding-bottom: 16px;
}

.ms-modern *, .ms-modern *::before, .ms-modern *::after {
    box-sizing: border-box;
    font-family: inherit;
}

/* ── Sections ── */
.ms-section {
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 24px;
}

/* ── Typography ── */
.ms-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.03em;
    margin: 0 0 8px 0;
}

.ms-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #6e6e73;
    margin: 0 0 28px 0;
}

/* ── Lifecycle Strip ── */
.ms-lc {
    display: flex;
    background: linear-gradient(135deg, #4A1D8E 0%, #5E2BAD 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(74,29,142,0.3);
}

.ms-lc-col {
    flex: 1;
    padding: 22px 28px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    cursor: pointer;
}

.ms-lc-col:hover { background: rgba(255,255,255,0.08); }
.ms-lc-col + .ms-lc-col { border-left: 1px solid rgba(255,255,255,0.15); }

.ms-lc-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.ms-lc-heading {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.ms-lc-links {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 54px;
}

.ms-lc-links li { margin-bottom: 10px; }

.ms-lc-links a {
    font-size: 15px;
    font-weight: 500;
    color: #3A1570;
    text-decoration: none;
    transition: color 0.15s;
}

.ms-lc-links a:hover { color: #1a0a3e; text-decoration: underline; }

/* ── Deal Cards ── */
.ms-deals { display: flex; flex-direction: column; gap: 12px; }

.ms-deal {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
    border-left: 3px solid transparent;
}

.ms-deal:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-1px);
    border-left-color: var(--gold);
}

.ms-deal-img {
    flex: 0 0 140px;
    height: 90px;
    background: #f9f9fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ms-deal-img img { max-width: 125px; max-height: 80px; object-fit: contain; }

.ms-deal-info { flex: 1; min-width: 0; }
.ms-deal-name { font-size: 17px; font-weight: 700; color: #1d1d1f; margin-bottom: 2px; }
.ms-deal-class { font-size: 14px; font-weight: 500; color: #6e6e73; margin-bottom: 6px; }
.ms-deal-loc { font-size: 14px; font-weight: 500; color: #424245; margin-bottom: 10px; }

.ms-deal-specs { display: flex; gap: 16px; }
.ms-deal-spec { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #1d1d1f; }
.ms-deal-spec svg { width: 16px; height: 16px; fill: #1d1d1f; }

.ms-deal-price { flex: 0 0 auto; text-align: right; padding-left: 20px; }
.ms-deal-amt { font-size: 28px; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; line-height: 1; }
.ms-deal-unit { font-size: 13px; font-weight: 500; color: #6e6e73; margin-top: 2px; }
.ms-deal-total { font-size: 13px; font-weight: 500; color: #424245; margin-top: 6px; }
.ms-deal-dates { font-size: 12px; color: #86868b; margin-top: 2px; }

/* ── Alpha Cars Banner ── */
.ms-alpha-banner {
    display: block;
    background: #0D1117;
    border-radius: 14px;
    padding: 32px;
    text-align: center;
    text-decoration: none !important;
    overflow: hidden;
    position: relative;
}

.ms-alpha-text {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #BF953F, #FCF6BA, #D4AF37, #FCF6BA, #BF953F);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: ms-shimmer 3s linear infinite;
}

@keyframes ms-shimmer {
    to { background-position: 200% center; }
}
.ms-alpha-ad {
    position: absolute;
    top: 12px;
    left: 14px;
    background: #D4AF37;
    color: #0D1117;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.4;
}

.ms-alpha-above,
.ms-alpha-below {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(212,175,55,0.7);
    letter-spacing: 0.08em;
    text-decoration: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ms-alpha-above {
    margin-bottom: 6px;
    transform: translateY(6px);
}

.ms-alpha-below {
    margin-top: 6px;
    transform: translateY(-6px);
}

.ms-alpha-banner:hover .ms-alpha-above,
.ms-alpha-banner:hover .ms-alpha-below {
    opacity: 1;
    transform: translateY(0);
}


/* ── Q&A Grid ── */
.ms-qa { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.ms-qa-link {
    display: block;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.03);
    text-decoration: none;
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
    border-left: 3px solid transparent;
}

.ms-qa-link:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-1px);
    border-left-color: var(--gold);
    color: var(--accent);
}

/* ── Locations ── */
.ms-locs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.ms-loc {
    display: block;
    padding: 14px 16px;
    background: #FBF6EA;
    border-radius: 10px;
    text-decoration: none;
    color: #424245;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s, color 0.15s;
}

.ms-loc:hover { background: #F5EDDA; color: var(--accent); }

/* ── DC Engine Button Override ── */
#dch button[type="submit"],
#dch [class*="submit"],
#dch [class*="Search"],
#dch [class*="search"],
#dch [class*="button" i][class*="primary" i],
#dch [class*="highlight"] {
    background: #4A1D8E !important;
    background-color: #4A1D8E !important;
    color: #D4AF37 !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    border: none !important;
}

/* ── Copyright ── */
.ms-copy { text-align: center; font-size: 13px; color: #86868b; padding: 32px 24px 48px; max-width: 920px; margin: 0 auto; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .ms-lc { flex-direction: column; }
    .ms-lc-col + .ms-lc-col { border-left: none; border-top: 1px solid rgba(255,255,255,0.15); }
    .ms-qa { grid-template-columns: 1fr; }
    .ms-locs { grid-template-columns: 1fr 1fr; }
    .ms-deal { flex-wrap: wrap; }
    .ms-deal-price { padding-left: 0; padding-top: 12px; border-top: 1px solid #f0f0f0; width: 100%; text-align: left; }
    .ms-title { font-size: 22px; }
    .ms-section { padding: 20px 24px; }
    .ms-trust { flex-direction: column; }
    .ms-trust-item { justify-content: center; }
}
