/**
 * hw-page-content.css
 *
 * Location: wp-content/themes/herb-whisperer/assets/css/hw-page-content.css
 * Enqueue from functions.php (site-wide).
 *
 * Styles WordPress block editor output within the .hw-page-content wrapper
 * so that standard blocks (paragraphs, headings, columns, groups, images,
 * lists, quotes, buttons) match the Herb Whisperer design system.
 *
 * This file is what makes "write everything in the editor" work visually.
 */

/* ==========================================================================
   1. BASE CONTENT WRAPPER
   ========================================================================== */

.hw-page-content {
    max-width: var(--hw-content-max, 1100px);
    margin: 0 auto;
    padding: var(--hw-space-xl, 3rem) var(--hw-space-md, 1.5rem);
}

/* When nested inside another constrained container, remove own constraints */
.hw-section-inner.hw-page-content,
.pp-about__inner.hw-page-content,
.hw-contact-form-wrap.hw-page-content {
    max-width: none;
    padding: 0;
}

.hw-page-content > *:first-child {
    margin-top: 0;
}

.hw-page-content > *:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

.hw-page-content h1,
.hw-page-content h2,
.hw-page-content h3,
.hw-page-content h4 {
    font-family: var(--hw-font-heading, 'Playfair Display', Georgia, serif);
    color: var(--hw-text, #2c2c2c);
    line-height: 1.3;
}

.hw-page-content h1 { font-size: 2rem; margin: 2rem 0 1rem; }
.hw-page-content h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.hw-page-content h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.hw-page-content h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

.hw-page-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--hw-text-secondary, #5a5a5a);
    margin-bottom: 1.25em;
}

.hw-page-content a {
    color: var(--hw-green, #00913A);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hw-page-content a:hover {
    color: var(--hw-green-dark, #006d2c);
}

/* Eyebrow pattern — use a paragraph with the CSS class "hw-eyebrow" */
.hw-page-content .hw-eyebrow {
    font-family: var(--hw-font-ui, 'Source Sans 3', sans-serif);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hw-green, #00913A);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   3. LISTS
   ========================================================================== */

.hw-page-content ul,
.hw-page-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--hw-text-secondary, #5a5a5a);
}

.hw-page-content li {
    margin-bottom: 0.5em;
}

/* ==========================================================================
   4. IMAGES
   ========================================================================== */

.hw-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.hw-page-content .wp-block-image {
    margin: 2rem 0;
}

.hw-page-content .wp-block-image figcaption {
    font-size: 0.85rem;
    color: var(--hw-text-light, #8a8a8a);
    text-align: center;
    margin-top: 0.5rem;
}

/* ==========================================================================
   5. COLUMNS (WordPress Columns block)
   ========================================================================== */

.hw-page-content .wp-block-columns {
    display: flex;
    gap: var(--hw-space-lg, 2rem);
    margin: 2rem 0;
    align-items: start;
}

.hw-page-content .wp-block-column {
    flex: 1;
}

@media (max-width: 768px) {
    .hw-page-content .wp-block-columns {
        flex-direction: column;
    }
}

/* ==========================================================================
   6. GROUP BLOCKS (sections with backgrounds)
   ========================================================================== */

/* Cream background section — apply CSS class "hw-section-cream" to a Group block */
.hw-page-content .hw-section-cream {
    background: var(--hw-bg-warm, #faf8f5);
    padding: var(--hw-space-xl, 3rem) var(--hw-space-lg, 2rem);
    margin-left: calc(-1 * var(--hw-space-md, 1.5rem));
    margin-right: calc(-1 * var(--hw-space-md, 1.5rem));
    border-radius: 0;
}

/* Full-width CTA section — apply CSS class "hw-cta-section" to a Group block */
.hw-page-content .hw-cta-section {
    background: linear-gradient(135deg, var(--hw-green, #00913A) 0%, var(--hw-green-dark, #006d2c) 100%);
    color: #fff;
    text-align: center;
    padding: var(--hw-space-xl, 3rem) var(--hw-space-lg, 2rem);
    margin-left: calc(-1 * var(--hw-space-md, 1.5rem));
    margin-right: calc(-1 * var(--hw-space-md, 1.5rem));
}

.hw-page-content .hw-cta-section h2,
.hw-page-content .hw-cta-section h3 {
    color: #fff;
}

.hw-page-content .hw-cta-section p {
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   7. BLOCKQUOTES (for testimonials)
   ========================================================================== */

.hw-page-content blockquote,
.hw-page-content .wp-block-quote {
    border-left: 3px solid var(--hw-green, #00913A);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--hw-bg-warm, #faf8f5);
    border-radius: 0 8px 8px 0;
}

.hw-page-content blockquote p {
    font-style: italic;
    font-size: 1.05rem;
}

.hw-page-content blockquote cite,
.hw-page-content .wp-block-quote cite {
    display: block;
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--hw-text, #2c2c2c);
    margin-top: 0.75rem;
}

/* ==========================================================================
   8. BUTTONS (WordPress Buttons block)
   ========================================================================== */

.hw-page-content .wp-block-button__link {
    background: var(--hw-green, #00913A);
    color: #fff;
    font-family: var(--hw-font-ui, 'Source Sans 3', sans-serif);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.hw-page-content .wp-block-button__link:hover {
    background: var(--hw-green-dark, #006d2c);
    color: #fff;
}

/* Outline style — apply "is-style-outline" to the Button block */
.hw-page-content .wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent;
    color: var(--hw-green, #00913A);
    border: 2px solid var(--hw-green, #00913A);
}

.hw-page-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--hw-green-pale, #e8f0e6);
}

/* ==========================================================================
   9. SEPARATORS / SPACERS
   ========================================================================== */

.hw-page-content .wp-block-separator {
    border: none;
    border-top: 1px solid var(--hw-border-light, #ece7df);
    margin: 2.5rem 0;
}

/* ==========================================================================
   10. CARD GRID — for manually created cards in the editor
   ========================================================================== */

/* Apply CSS class "hw-card-grid" to a Columns block for card-style layout */
.hw-page-content .hw-card-grid {
    gap: var(--hw-space-md, 1.5rem);
}

.hw-page-content .hw-card-grid > .wp-block-column {
    background: #fff;
    border: 1px solid var(--hw-border-light, #ece7df);
    border-radius: 12px;
    padding: var(--hw-space-lg, 2rem);
    transition: box-shadow 0.2s;
}

.hw-page-content .hw-card-grid > .wp-block-column:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Text centering helper */
.hw-page-content .hw-text-center {
    text-align: center;
}
