/*
 * LifeHustleAI Responsive Normalization Layer — Phase 2
 * Load AFTER global.css + page CSS.
 */

/* Shared guardrails */
.lh-site .hero,
.lh-site .page-container,
.lh-site .lh-container,
.lh-site .lh-professional-viewer,
.lh-site .lh-form-wrapper {
    max-width: 100%;
}
.lh-site .hero,
.lh-site .value-section,
.lh-site .contact-section,
.lh-site .preview-simple {
    overflow: hidden;
}

/* Grid defaults (desktop) */
.lh-site .lh-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.lh-site .pricing-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lh-site .categories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.lh-site .comparison-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.lh-site .quota-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lh-site .toc-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.lh-site .testimonials-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lh-site .lh-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Tables – scroll on overflow */
.lh-site .lh-blueprints-table,
.lh-site .lh-professional-viewer table {
    width: 100%;
}
.lh-site .lh-blueprints-table {
    min-width: 760px;   /* kept for desktop */
}
.lh-site .lh-blueprints-table-wrap,
.lh-site .lh-table-wrap,
.lh-site .lh-blueprint-render {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* CTAs – prevent overflow */
.lh-site .btn-primary,
.lh-site .lh-btn,
.lh-site .lh-btn-primary,
.lh-site .lh-btn-secondary,
.lh-site .contact-link,
.lh-site .lh-message-button {
    max-width: 100%;
}

/* =========================================================
   TABLET (max-width: 1100px)
   ========================================================= */
@media (max-width: 1100px) {
    .lh-site .hero {
        padding: 44px 32px;
    }
    .lh-site .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lh-site .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lh-site .lh-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lh-site .pricing-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lh-site .toc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lh-site .value-section {
        padding: 52px 32px;
    }
    .lh-site .viewer-header {
        gap: 18px;
    }
    .lh-site .lh-post-content {
        max-width: 100%;
    }
}

/* =========================================================
   MOBILE (max-width: 767px)
   ========================================================= */
@media (max-width: 767px) {
    .lh-site .hero {
        padding: 38px 20px;
        border-radius: var(--lh-radius-lg);   /* 24px (was 20px) */
    }
    .lh-site .categories-grid,
    .lh-site .testimonials-grid,
    .lh-site .lh-post-grid,
    .lh-site .pricing-features,
    .lh-site .toc-grid,
    .lh-site .quota-grid,
    .lh-site .comparison-row,
    .lh-site .lh-row-2 {
        grid-template-columns: 1fr;
    }
    .lh-site .value-section {
        padding: 44px 20px;
        border-radius: var(--lh-radius-lg);
    }
    .lh-site .contact-section {
        padding: 2rem 1rem;
        border-radius: var(--lh-radius-lg);
    }
    .lh-site .contact-link {
        width: 100%;
        justify-content: center;
    }

    /* FAQ / legal sections – more compact */
    .lh-site .faq-item,
    .lh-site .policy-section,
    .lh-site .terms-section {
        padding: 20px;
        border-radius: var(--lh-radius-md);   /* 16px (was 14px) */
    }

    .lh-site .pricing-card {
        width: 100%;
        max-width: 100%;
    }

    /* Request form */
    .lh-site .lh-form-wrapper {
        width: calc(100% - 28px);
        max-width: none;
    }
    .lh-site .lh-row-2 {
        gap: 14px;
    }

    /* Buttons full width on mobile */
    .lh-site .lh-btn,
    .lh-site .lh-btn-primary,
    .lh-site .lh-btn-secondary,
    .lh-site .btn-primary,
    .lh-site .lh-btn-highlight,
    .lh-site .lh-btn-submit {
        width: 100%;
        justify-content: center;
    }

    /* Viewer */
    .lh-site .viewer-header {
        flex-direction: column;
        align-items: stretch;
    }
    .lh-site .viewer-header .btn-primary,
    .lh-site .viewer-header .lh-btn-primary {
        width: 100%;
    }
    .lh-site .lh-professional-viewer {
        padding: 1rem 14px;
    }
    .lh-site .blueprint-title {
        font-size: 1.55rem;
    }
    .lh-site .modern-loader {
        padding: 2rem 1rem;
    }

    /* Single blog */
    .lh-site .lh-post-sidebar {
        min-width: 0;
        width: 100%;
    }
    .lh-site .lh-hero-overlay {
        position: relative;
        inset: auto;
        padding: 12px 14px;
    }

    /* Tables – keep min-width for horizontal scroll */
    .lh-site .lh-blueprints-table {
        min-width: 760px;
    }

    /* Legal boxes */
    .lh-site .highlight-box,
    .lh-site .warning-box,
    .lh-site .guarantee-box {
        padding: 18px;
    }
}

/* =========================================================
   SMALL PHONES (max-width: 480px)
   ========================================================= */
@media (max-width: 480px) {
    .lh-site .hero {
        padding: 32px 16px;
        border-radius: var(--lh-radius-md);   /* 16px */
    }
    .lh-site .category-card,
    .lh-site .testimonial,
    .lh-site .faq-item,
    .lh-site .policy-section,
    .lh-site .terms-section,
    .lh-site .lh-card,
    .lh-site .lh-feedback-card {
        padding: 17px;
    }
    .lh-site .preview-simple {
        padding: 28px 16px;
        border-radius: var(--lh-radius-lg);
    }
    .lh-site .preview-item {
        padding: 12px 16px;
    }
    .lh-site .lh-message-box {
        width: calc(100% - 28px);
        max-width: none;
        padding: 28px 20px;
        border-radius: var(--lh-radius-lg);
    }
    .lh-site .lh-message-button {
        width: 100%;
    }
}