/* --- MARKETMIND PRICING (Enhanced Uniform Light Mode) --- */

.pricing-wrapper {
    --p-bg-main: #f8fafc;
    --p-bg-card: rgba(255, 255, 255, 0.7);
    --p-text-main: #18181b;
    --p-text-muted: #64748b;
    --p-accent: #0b1013;
    --p-border: rgba(0, 0, 0, 0.06);
    --p-radius: 16px;
    --p-gradient: linear-gradient(180deg, rgba(59, 130, 246, 0.95), rgba(6, 182, 212, 0.85));

    background: var(--p-bg-main);
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--p-text-main);
    padding: 0px 0px;
    padding-bottom: 20px;
    min-height: 100vh;
}

/* 1. Ensure your actual Top Nav is always on top */
#header-placeholder {
    position: sticky;
    top: 0;
    z-index: 100; /* Higher than everything else */
    background: white; /* Or your preferred nav color */
}

.pricing-wrapper .header {
    text-align: center;
    padding-top: 10px;
    margin-bottom: 80px;
    color: rgb(26, 26, 26);
    background: var(--p-gradient);
    height: 25vh;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.pricing-wrapper .title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

/* Grid Layout */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1300px;
    margin: -50px auto 0; /* Pulls the cards UP into the blue area slightly */
    align-items: stretch;
    position: relative;
    z-index: 2; /* Higher than the blue header (.header) */
}

/* Plan Cards - Fixed height logic */
.plan {
    background: var(--p-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px 20px;
    border-radius: var(--p-radius);
    border: 1px solid var(--p-border);
    transition: all 0.3s ease;
    
    /* Crucial for bottom button alignment */
    display: flex;
    flex-direction: column; 
    height: 100%; 
    position: relative;
    box-sizing: border-box;
}

.plan:hover {
    border-color: var(--p-accent);
    transform: translateY(-5px);
    background: #ffffff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.04);
}

.plan.featured {
    border: 1.5px solid var(--p-accent);
    background: #ffffff;
}

/* Price & Typography */
.plan h2 { font-size: 1.25rem; margin-bottom: 5px; }
.price {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--p-text-main);
}

/* Tabs */
.tabs {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 8px 2px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    color: var(--p-text-muted);
    border-radius: 8px;
    transition: 0.2s;
}

.tab.active {
    background: white;
    color: var(--p-accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Tab Content & Feature List */
.content-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes the content area fill available space */
}

.tab-content {
    display: none;
    flex-direction: column;
    flex-grow: 1; /* Pushes the button inside tabs to the bottom */
}

.tab-content.active { display: flex; }

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    /* This is the magic line: it grows to take up all empty space, 
       pushing the button to the bottom */
    flex-grow: 1; 
}

.feature-list li {
    padding: 8px 0;
    font-size: 0.75rem;
    color: var(--p-text-muted);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

/* Buttons - Now anchored to the bottom */
.pricing-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.2s;
    background: var(--p-text-main);
    color: white;
    margin-top: auto; /* Extra safety for alignment */
}

.pricing-btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: var(--p-text-main);
}

.pricing-btn:hover {
    background: var(--p-accent);
    color: white;
    border-color: var(--p-accent);
}

/* Popular Badge */
.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--p-accent);
    color: white;
    padding: 4px 12px;
    font-size: 0.65rem;
    border-radius: 20px;
    font-weight: 800;
    white-space: nowrap;
}

/* --- RESPONSIVENESS STYLES --- */

/* For Tablets (Medium Screens) */
@media (max-width: 1100px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr); /* 2x2 Grid */
        gap: 20px;
        padding: 0 20px;
    }

    .pricing-wrapper .header {
        height: auto; /* Allow header to grow if text wraps */
        padding: 40px 0;
    }
}

/* For Mobile Phones (Small Screens) */
@media (max-width: 650px) {
    .pricing-grid {
        grid-template-columns: 1fr; /* Single column stack */
        max-width: 400px; /* Prevents cards from becoming too wide */
    }

    .pricing-wrapper .title {
        font-size: 1.8rem; /* Scale down title for mobile */
    }

    .pricing-wrapper .subtitle {
        font-size: 0.85rem;
        padding: 0 15px;
    }

    .plan {
        padding: 30px 20px; /* Slightly more vertical breathing room */
        height: auto; /* Let content dictate height on mobile */
        border: 1px solid black;
    }

    .price {
        font-size: 1.4rem; /* Ensure price remains legible but compact */
    }

    /* Tabs can get cramped, ensure they allow text to fit */
    .tab {
        font-size: 0.7rem;
        padding: 10px 2px;
    }
}