/* =============================================================
   MHPI Homepage — Scoped Styles
   All selectors prefixed with #mhpi-hp to avoid GeneratePress conflicts
   ============================================================= */

/* --- Reset inside scope --- */
#mhpi-hp,
#mhpi-hp * {
    box-sizing: border-box;
}

#mhpi-hp {
    font-family: 'DM Sans', sans-serif;
    max-width: 780px;
    margin: 0 auto;
    padding: 0.5rem 0 3rem;
    color: #1a1a1a;
    line-height: 1.6;
}

/* --- Hero --- */
.mhpi-hero {
    position: relative;
    padding: 3rem 2.5rem 2.5rem;
    margin: 0 0 0.5rem;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #0a2a4a 0%, #0d3d6b 40%, #1a5a9e 100%);
    isolation: isolate;
}

/* Animated SVG background */
.mhpi-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='420' viewBox='0 0 900 420'%3E%3Cdefs%3E%3CradialGradient id='g1' cx='30%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%232176c7' stop-opacity='0.4'/%3E%3Cstop offset='100%25' stop-color='%232176c7' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2' cx='80%25' cy='70%25' r='45%25'%3E%3Cstop offset='0%25' stop-color='%2300c2a8' stop-opacity='0.25'/%3E%3Cstop offset='100%25' stop-color='%2300c2a8' stop-opacity='0'/%3E%3C/radialGradient%3E%3Cfilter id='blur'%3E%3CfeGaussianBlur stdDeviation='18'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='900' height='420' fill='none'/%3E%3Ccircle cx='270' cy='168' r='210' fill='url(%23g1)' filter='url(%23blur)'/%3E%3Ccircle cx='720' cy='294' r='180' fill='url(%23g2)' filter='url(%23blur)'/%3E%3Cg opacity='0.07' stroke='%23ffffff' stroke-width='1' fill='none'%3E%3Cline x1='0' y1='420' x2='180' y2='0'/%3E%3Cline x1='120' y1='420' x2='300' y2='0'/%3E%3Cline x1='240' y1='420' x2='420' y2='0'/%3E%3Cline x1='360' y1='420' x2='540' y2='0'/%3E%3Cline x1='480' y1='420' x2='660' y2='0'/%3E%3Cline x1='600' y1='420' x2='780' y2='0'/%3E%3Cline x1='720' y1='420' x2='900' y2='0'/%3E%3C/g%3E%3Cg opacity='0.06' stroke='%23ffffff' stroke-width='0.8' fill='none'%3E%3Cellipse cx='450' cy='210' rx='420' ry='180'/%3E%3Cellipse cx='450' cy='210' rx='330' ry='140'/%3E%3Cellipse cx='450' cy='210' rx='240' ry='100'/%3E%3C/g%3E%3Ccircle cx='820' cy='40' r='3' fill='%23ffffff' opacity='0.4'/%3E%3Ccircle cx='760' cy='80' r='2' fill='%23ffffff' opacity='0.3'/%3E%3Ccircle cx='860' cy='120' r='1.5' fill='%23ffffff' opacity='0.5'/%3E%3Ccircle cx='50' cy='60' r='2.5' fill='%23ffffff' opacity='0.25'/%3E%3Ccircle cx='100' cy='30' r='1.5' fill='%23ffffff' opacity='0.35'/%3E%3Crect x='780' y='300' width='60' height='60' rx='6' stroke='%23ffffff' stroke-width='0.8' fill='none' opacity='0.08' transform='rotate(15 810 330)'/%3E%3Crect x='30' y='320' width='45' height='45' rx='4' stroke='%23ffffff' stroke-width='0.8' fill='none' opacity='0.06' transform='rotate(-10 52 342)'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    z-index: -1;
    animation: mhpi-hero-drift 18s ease-in-out infinite alternate;
    transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1);
    transition: transform 0.4s ease-out;
}

/* Floating orbs */
.mhpi-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 220px 180px at 75% 20%, rgba(0, 194, 168, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 300px 200px at 10% 80%, rgba(33, 118, 199, 0.22) 0%, transparent 65%);
    z-index: -1;
    animation: mhpi-orb-shift 12s ease-in-out infinite alternate;
}

@keyframes mhpi-hero-drift {
    0%   { transform: scale(1) translateX(0); }
    100% { transform: scale(1.06) translateX(-18px); }
}

@keyframes mhpi-orb-shift {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.08) translate(10px, -8px); }
}

/* House silhouette decoration */
.mhpi-hero-house {
    position: absolute;
    right: -10px;
    bottom: 0;
    width: 260px;
    height: 180px;
    opacity: 0.07;
    pointer-events: none;
}

.mhpi-kicker {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(130, 200, 255, 0.9);
    margin: 0 0 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mhpi-kicker::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: rgba(130, 200, 255, 0.6);
    border-radius: 2px;
}

.mhpi-h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.18;
    color: #ffffff;
    margin: 0 0 1rem;
    text-shadow: 0 2px 24px rgba(0,0,0,0.2);
}

.mhpi-h1 em {
    font-style: italic;
    color: #5dd8c0;
}

.mhpi-sub {
    font-size: 1rem;
    color: rgba(210, 230, 255, 0.82);
    max-width: 520px;
    margin: 0 0 1.75rem;
    line-height: 1.75;
}

.mhpi-divider {
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, #5dd8c0, #378ADD);
    border: none;
    margin: 0 0 2rem;
    border-radius: 2px;
}

/* --- Trust signals --- */
.mhpi-trust {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding: 0;
    margin: 0 0 2.5rem;
}

.mhpi-trust li {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: #666;
}

.mhpi-trust li i {
    color: #185FA5;
    font-size: 15px;
    flex-shrink: 0;
}

/* --- Section headers --- */
.mhpi-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 0.875rem;
}

.mhpi-section-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    margin: 0;
}

.mhpi-see-all {
    font-size: 0.8rem;
    color: #185FA5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.mhpi-see-all:hover {
    text-decoration: underline;
}

/* --- Calculator cards grid --- */
.mhpi-calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 0 0 2.5rem;
}

.mhpi-calc-card {
    display: block;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: #1a1a1a;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.mhpi-calc-card:hover {
    border-color: #378ADD;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(24, 95, 165, 0.08);
    text-decoration: none;
    color: #1a1a1a;
}

.mhpi-calc-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin: 0 0 0.875rem;
}

.mhpi-blue  { background: #E6F1FB; color: #185FA5; }
.mhpi-teal  { background: #E1F5EE; color: #0F6E56; }
.mhpi-amber { background: #FAEEDA; color: #854F0B; }
.mhpi-coral { background: #FAECE7; color: #993C1D; }
.mhpi-green { background: #EAF3DE; color: #3B6D11; }

.mhpi-calc-card h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #111;
    margin: 0 0 0.3rem;
}

.mhpi-calc-card p {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 0.75rem;
    line-height: 1.55;
}

.mhpi-card-cta {
    font-size: 0.78rem;
    font-weight: 500;
    color: #185FA5;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* --- About block --- */
.mhpi-about {
    background: #f7f9fb;
    border-left: 3px solid #185FA5;
    border-radius: 0 10px 10px 0;
    padding: 1.5rem 1.5rem 1.5rem 1.25rem;
    margin: 0 0 2.5rem;
}

.mhpi-about-quote {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.2rem;
    font-style: italic;
    color: #185FA5;
    margin: 0 0 0.75rem;
    padding: 0;
    border: none;
}

.mhpi-about p {
    font-size: 0.9rem;
    color: #444;
    margin: 0;
    line-height: 1.8;
}

.mhpi-about strong {
    color: #111;
    font-weight: 500;
}

/* --- Blog posts list --- */
.mhpi-posts {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
}

.mhpi-posts li {
    border-bottom: 1px solid #f0f0f0;
}

.mhpi-posts li:last-child {
    border-bottom: none;
}

.mhpi-posts a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 0;
    font-size: 0.875rem;
    color: #222;
    text-decoration: none;
    transition: color 0.15s;
}

.mhpi-posts a:hover {
    color: #185FA5;
    text-decoration: none;
}

.mhpi-posts a i {
    font-size: 15px;
    color: #aaa;
    flex-shrink: 0;
}

/* --- Bottom CTA --- */
.mhpi-bottom-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0.5rem;
}

.mhpi-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #185FA5;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}

.mhpi-btn-primary:hover {
    background: #0C447C;
    color: #fff;
    text-decoration: none;
}

.mhpi-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #185FA5;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #378ADD;
    text-decoration: none;
    transition: background 0.15s;
}

.mhpi-btn-ghost:hover {
    background: #E6F1FB;
    text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .mhpi-calc-grid {
        grid-template-columns: 1fr;
    }

    .mhpi-trust {
        gap: 0.4rem 1rem;
    }

    .mhpi-h1 {
        font-size: 1.9rem;
    }
}
