/*
Theme Name: Walt Opie Child Theme
Description: Child theme of Twenty Twenty-Five with Tailwind CSS v4 and Alpine.js
Template: twentytwentyfive
Version: 1.0
*/

/* Import Manrope font for design system */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap');

/* Import parent theme styles */
@import url("../twentytwentyfive/style.css");

:root {
    --wp--preset--font-size--base: 1.125rem !important; /* Default is usually 1rem */
}

/* ===== SPACING OVERRIDES ===== */
/* Button group spacing - 2rem margin bottom with higher specificity */
.wp-block-buttons,
.wp-block-group .wp-block-buttons,
div.wp-block-buttons {
    margin-bottom: 2rem ;
    padding-bottom: 2rem ;
}

/* Target the specific button container in the hero section */
.wp-block-group[style*="background-color:#f9fafb"] .wp-block-buttons {
    margin-bottom: 2rem ;
    padding-bottom: 2rem ;
}

/* Recent Teachings section - target the white background group that comes after hero */
.wp-block-group[style*="background-color:#ffffff"] {
    padding-top: 2rem ;
}

/* Alternative: target any group with white background and padding already defined */
.wp-block-group.has-background[style*="background-color:#ffffff"][style*="padding-top:4rem"] {
    padding-top: 2rem ;
}

/* ===== WALT OPIE BRAND BUTTON STYLING ===== */
/* Brand-compliant button colors with proper contrast ratios */

/* Primary buttons - Dark brown background with white text */
.wp-block-button__link,
.wp-block-button .wp-block-button__link {
    background-color: #8B4513 ;
    color: #ffffff ;
    border: 2px solid #8B4513 ;
}

.wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:hover {
    background-color: #6D4C41 ;
    border-color: #6D4C41 ;
    color: #ffffff ;
}

/* Secondary/outline buttons - White background with dark brown text and border */
.wp-block-button__link.is-style-outline,
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button__link[style*="background-color:#ffffff00"],
.wp-block-button__link.has-custom-brown-color {
    background-color: #ffffff ;
    color: #8B4513 ;
    border: 2px solid #8B4513 ;
}

.wp-block-button__link.is-style-outline:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button__link[style*="background-color:#ffffff00"]:hover,
.wp-block-button__link.has-custom-brown-color:hover {
    background-color: #DAA520 ;
    border-color: #DAA520 ;
    color: #ffffff ;
}

/* Override Twenty Twenty-Five page template spacing */
main.wp-block-group[style*="margin-top:var(--wp--preset--spacing--60)"] {
    margin-top: 0 ;
}

/* Target the specific div causing the 32px gap */
.wp-block-group.alignfull[style*="padding-top:var(--wp--preset--spacing--60)"] {
    padding-top: 0 ;
    padding-bottom: 0 ;
}

.wp-block-group[style*="padding-top:var(--wp--preset--spacing--60)"] {
    padding-top: 0 ;
    padding-bottom: 0 ;
}

/* Force override of all spacing-60 variables */
:root {
    --wp--preset--spacing--60: 0px ;
}

/* Additional aggressive override for main element */
main {
    margin-top: 0 ;
}

/* Target the specific wrapper div that's creating the gap */
main > .wp-block-group.alignfull {
    padding-top: 0 ;
    padding-bottom: 0 ;
}

/* Override WordPress block gap that's creating spacing */
.entry-content {
    --wp--style--block-gap: 0px ;
    margin-top: 0 ;
    padding-top: 0 ;
}

.entry-content > * {
    margin-block-start: 0 ;
    margin-block-end: 0 ;
}

/* Target About page specifically to remove first block margin */
.page-id-24 .entry-content > *:first-child {
    margin-top: 0 ;
    margin-bottom: 0 ;
}


/* ===== WORDPRESS CSS SPECIFICITY SOLUTION - NO  declarations ===== */
/* High-specificity selectors to override parent theme layout constraints */

/* CSS Custom Properties for maintainable full-width layouts */
:root {
    /* Layout Control Variables */
    --full-width-offset: calc(-100vw / 2 + 50%);
    --content-padding-sm: 1rem;
    --content-padding-md: 2rem;
    --content-max-width: 70ch;
    
    /* Walt Opie Brand Colors */
    --color-primary: #8B4513; /* Warm brown - earth/meditation */
    --color-secondary: #2E8B57; /* Forest green - nature/calm */
    --color-accent: #DAA520; /* Golden rod - wisdom/light */
    --color-neutral: #6B7280; /* Warm gray */
}

/* ===== FULL-WIDTH BACKGROUND SUPPORT ===== */
/* Override Twenty Twenty-Five layout constraints with higher specificity */

/* Full-width for main containers - Specificity: 0,3,1 */
main.wp-block-group .wp-block-group.alignfull {
    /* margin-left: var(--full-width-offset);
    margin-right: var(--full-width-offset); */
    width: 100vw;
    max-width: none;
}

/* Full-width for post content containers - Specificity: 0,4,0 */
.wp-site-blocks .wp-block-post-content .wp-block-group.alignfull {
    /* margin-left: var(--full-width-offset);
    margin-right: var(--full-width-offset); */
    width: 100vw;
    max-width: none;
}

/* Background-specific full-width elements - Specificity: 0,2,2 */
.wp-block-group.alignfull[style*="background"][class*="wp-block"] {
    margin-left: var(--full-width-offset);
    margin-right: var(--full-width-offset);
    width: 100vw;
    max-width: none;
}

/* Override constrained layout for specific background sections - Specificity: 0,3,2 */
.wp-block-group[class*="alignfull"][style*="background"][data-layout-type*="constrained"] {
    margin-left: var(--full-width-offset);
    margin-right: var(--full-width-offset);
    width: 100vw;
    max-width: none;
}

/* ===== LAYOUT MARGIN & PADDING OVERRIDES ===== */
/* Override WordPress Block Editor inline spacing with higher specificity */

/* Override WordPress auto-generated inline spacing - Specificity: 0,2,1 + [style] */
main.wp-block-group[style*="padding-top"]:not(.hero-section) {
    padding-top: 0 ;
}

main.wp-block-group[style*="padding-bottom"]:not(.hero-section) {
    padding-bottom: 0 ;
}

main.wp-block-group[style*="margin-top"]:not(.hero-section) {
    margin-top: 0 ;
}

main.wp-block-group[style*="margin-bottom"]:not(.hero-section) {
    margin-bottom: 0 ;
}

/* Override WordPress auto-margins on child containers - Specificity: 0,3,1 + [style] */
main.wp-block-group .wp-block-group[style*="margin-top"]:not(.hero-section) {
    margin-top: 0 ;
}

main.wp-block-group .wp-block-group[style*="margin-bottom"]:not(.hero-section) {
    margin-bottom: 0 ;
}

main.wp-block-group .wp-block-group[style*="padding-top"]:not(.hero-section) {
    padding-top: 0 ;
}

main.wp-block-group .wp-block-group[style*="padding-bottom"]:not(.hero-section) {
    padding-bottom: 0 ;
}

/* Remove global padding from main element - Specificity: 0,2,1 */
main.wp-block-group.has-global-padding {
    padding-left: 0;
    padding-right: 0;
}

/* Clean slate for main element */
main.wp-block-group {
    margin: 0;
    padding: 0;
}

/* ===== CONTENT READABILITY & TYPOGRAPHY ===== */
/* Higher specificity replacements for  declarations */

/* Content width for readability - Specificity: 0,3,1 to 0,4,1 */
.wp-site-blocks .wp-block-post-content p:not([style*="text-align"]),
.wp-site-blocks .entry-content p:not([style*="text-align"]),
.wp-site-blocks .wp-block-post-content .wp-block-paragraph:not([style*="text-align"]),
.wp-site-blocks .entry-content .wp-block-paragraph:not([style*="text-align"]) {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5rem;
    margin-bottom: 1rem;
}

.page-id-24 .wp-site-blocks .wp-block-post-content p:not([style*="text-align"]){
    line-height: 2rem;
}

/* Headings width constraint - Specificity: 0,3,1 to 0,4,1 */
.wp-site-blocks .wp-block-post-content h1:not([style*="text-align"]),
.wp-site-blocks .wp-block-post-content h2:not([style*="text-align"]),
.wp-site-blocks .wp-block-post-content h3:not([style*="text-align"]),
.wp-site-blocks .wp-block-post-content h4:not([style*="text-align"]),
.wp-site-blocks .wp-block-post-content h5:not([style*="text-align"]),
.wp-site-blocks .wp-block-post-content h6:not([style*="text-align"]),
.wp-site-blocks .entry-content h1:not([style*="text-align"]),
.wp-site-blocks .entry-content h2:not([style*="text-align"]),
.wp-site-blocks .entry-content h3:not([style*="text-align"]),
.wp-site-blocks .entry-content h4:not([style*="text-align"]),
.wp-site-blocks .entry-content h5:not([style*="text-align"]),
.wp-site-blocks .entry-content h6:not([style*="text-align"]) {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;


}
.page-id-208 .wp-site-blocks .wp-block-post-content h2:not([style*="text-align"]),
.page-id-208 .page-resources .wp-site-blocks .entry-content h2:not([style*="text-align"]),
.page-id-24 .wp-site-blocks .wp-block-post-content h2:not([style*="text-align"]),
.page-id-24 .page-resources .wp-site-blocks .entry-content h2:not([style*="text-align"])
{
    margin-bottom:1rem;
    margin-top:2.5rem;
    max-width: 750px;
}

.wp-site-blocks .wp-block-post-content h2:not([style*="text-align"]){
    color: var(--walt-green-dark);
}

/* Content margins for responsive spacing - Specificity: 0,4,0 */
.wp-site-blocks .wp-block-post-content .wp-block-group .wp-block-image,
.wp-site-blocks .wp-block-post-content .wp-block-group .wp-block-columns,
.wp-site-blocks .wp-block-post-content .wp-block-group .wp-block-paragraph {
    margin-left: var(--content-padding-sm);
    margin-right: var(--content-padding-sm);
}

@media (min-width: 768px) {
    .wp-site-blocks .wp-block-post-content .wp-block-group .wp-block-image,
    .wp-site-blocks .wp-block-post-content .wp-block-group .wp-block-columns,
    .wp-site-blocks .wp-block-post-content .wp-block-group .wp-block-paragraph {
        margin-left: var(--content-padding-md);
        margin-right: var(--content-padding-md);
    }
}

/* ===== TAILWIND & ALPINE.JS INTEGRATION ===== */
/* Tailwind CSS v4 will be loaded via CDN in functions.php */
/* Alpine.js will be loaded via CDN in functions.php */

/* Hero section layout constraints - Specificity: 0,3,0 */
.wp-site-blocks .wp-block-post-content div[style*="display:flex"][style*="gap:3rem"] {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1024px) {
    .wp-site-blocks .wp-block-post-content div[style*="display:flex"][style*="gap:3rem"] {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== MEDITATION SITE BRANDING ===== */

/* Meditation-focused typography */
.meditation-text {
    line-height: 1.8;
    letter-spacing: 0.025em;
}

/* Audio player styles will be enhanced with Penguin UI components */
.dharma-talk-player {
    /* Styling will be handled via Tailwind v4 + Penguin UI */
}

/* ===== WALT OPIE PROFILE PHOTO COMPONENT ===== */
/* Reusable across all pages */

/* Base Walt photo styling - consistent size across all pages */
.walt-profile-photo {
    /* Identical dimensions everywhere for smooth position-only transitions */
    width: 280px;
    height: auto;
    border-radius: 12px ;
    
    /* Image rendering */
    object-fit: cover;
    object-position: center;
    max-width: none;
    
    /* Visual effects */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.7s ease-in-out;
    
    /* View Transitions API - enables position animation between pages */
    view-transition-name: walt-profile-photo;
}

/* Target WordPress image block directly if needed */
.wp-block-image img[src*="walt"],
.wp-block-image .walt-profile-photo,
img[alt*="Walt"],
img[alt*="walt"] {
    border-radius: 12px ;
}

.walt-profile-photo:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Walt photo container - positioning varies by page, photo size stays same */
.walt-photo-container {
    margin-bottom: 1.5rem;
    position: relative;
}

/* HOME PAGE: Center positioning in hero section */
.hero-section .walt-photo-container,
.walt-photo-container.hero-center {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-section .walt-profile-photo-figure,
.walt-photo-container.hero-center .walt-profile-photo-figure {
    margin: 0 auto;
}

/* ABOUT PAGE: Left column positioning in 2-column layout */
.content-section .walt-photo-container,
.walt-photo-container.content-left {
    text-align: left;
    display: block;
}

.content-section .walt-profile-photo-figure,
.walt-photo-container.content-left .walt-profile-photo-figure {
    margin: 0;
}

.walt-profile-photo-figure {
    margin: 0;
    /* Note: No view-transition-name here - only on the img element */
}

/* Responsive sizing - maintains aspect ratio across all breakpoints */
@media (max-width: 768px) {
    .walt-profile-photo {
        width: 240px; /* Smaller but still consistent across pages */
    }
}

@media (max-width: 480px) {
    .walt-profile-photo {
        width: 200px; /* Smallest size but still consistent */
    }
}

/* Walt photo hover effect removed per user request */

/* Hero section enhancements */
.hero-section {
    text-align: center;
}

.hero-section h1 {
    margin-top: 0;
    margin-bottom: 2rem;
}

/* Hero section specific Walt photo spacing */
.hero-section .walt-photo-container {
    margin-bottom: 1.5rem;
}

/* Override spacing fixes specifically for hero section margins */
.hero-section[style*="margin-bottom"] {
    margin-bottom: 3rem ;
}

/* Ensure hero section maintains its own padding even with global overrides */
.hero-section[style*="padding-top"] {
    padding-top: 3rem ;
}

.hero-section[style*="padding-bottom"] {
    padding-bottom: 3rem ;
}

/* ===== VIEW TRANSITIONS API - POSITION-ONLY ANIMATIONS ===== */
/* Walt's photo smoothly slides between positions without size/shape changes */

@media (prefers-reduced-motion: no-preference) {
    /* Enhanced View Transitions for supported browsers */
    @supports (view-transition-name: auto) {
        /* Walt's photo - same size, position animates smoothly */
        .walt-profile-photo {
            view-transition-name: walt-profile-photo;
        }
        
        /* Custom animation timing for position-only transitions */
        ::view-transition-old(walt-profile-photo),
        ::view-transition-new(walt-profile-photo) {
            animation-duration: 0.7s;
            animation-timing-function: ease-in-out;
        }
        
        /* Smooth slide animation for Walt's photo position changes */
        ::view-transition-old(walt-profile-photo) {
            animation-name: walt-position-exit;
        }
        
        ::view-transition-new(walt-profile-photo) {
            animation-name: walt-position-enter;
        }
    }
    
    /* Fallback CSS transitions for browsers without View Transitions support */
    .walt-profile-photo {
        transition: transform 0.7s ease-in-out,
                    box-shadow 0.7s ease-in-out;
    }
}

/* Custom keyframes for position-only transitions */
@keyframes walt-position-exit {
    to {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

@keyframes walt-position-enter {
    from {
        opacity: 0.8;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== TWO-COLUMN HERO LAYOUTS ===== */
/* Collection pages with Walt photo + content structure */

/* ABOUT PAGE: Restore original layout - no changes needed */
/* The About page was working fine with its existing structure */

/* DHARMA TALKS ARCHIVE: Two-column hero layout responsive support */
/* Target the WordPress columns block in the dharma talks archive */
.dharma-talks-hero .wp-block-columns {
    /* Ensure proper responsive behavior */
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: start;
}

.dharma-talks-hero .wp-block-column:first-child {
    grid-column: 1;
}

.dharma-talks-hero .wp-block-column:last-child {
    grid-column: 2;
}

/* RESPONSIVE DESIGN: Mobile-first approach */
@media (max-width: 1024px) {
    
    /* Dharma Talks archive responsive */
    .dharma-talks-hero .wp-block-columns {
        grid-template-columns: 1fr ;
        gap: 2rem ;
    }
    
    .dharma-talks-hero .wp-block-column:first-child,
    .dharma-talks-hero .wp-block-column:last-child {
        grid-column: auto;
    }
    
    /* Mobile: Center Walt photo in dharma talks archive */
    .dharma-talks-hero .wp-block-column:first-child {
        text-align: center;
        padding-left: 0 ;
    }
}

@media (max-width: 768px) {
    .dharma-talks-hero .wp-block-columns {
        gap: 1.5rem ;
    }
}

/* ===== WALT PHOTO COMPONENT ENHANCEMENTS ===== */
/* Ensure Walt photo works properly in all two-column layouts */

/* Two-column layout: Walt photo positioning for Dharma Talks archive only */
.dharma-talks-hero .walt-photo-container {
    text-align: left;
    margin-bottom: 0;
}

.dharma-talks-hero .walt-profile-photo-figure {
    margin: 0;
}

/* Ensure Walt photo maintains consistent sizing in Dharma Talks archive */
.dharma-talks-hero .walt-profile-photo {
    width: 280px;
    height: auto;
}

/* ===== DHARMA TALKS CARDS STYLING ===== */
/* Enhanced cards with better padding, contrast, and hover effects */

/* Override WordPress block padding for dharma talk cards */
.wp-block-group[style*="border-color:#e5e7eb"][style*="padding-top:1.5rem"] {
    padding-top: 2.5rem ;
    padding-bottom: 2.5rem ;
}

/* More specific targeting for dharma talks page cards */
.wp-block-post-content .wp-block-group[style*="background-color:#ffffff"][style*="border-radius:8px"] {
    padding-top: 2.5rem ;
    padding-bottom: 2.5rem ;
}

.dharma-talks-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.dharma-talk-card {
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 3rem 2.5rem; /* Increased top/bottom padding from 2rem */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.dharma-talk-card:hover {
    transform: scale(1.1); /* 10% scale up on hover */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15); /* Heavier shadow on hover */
    border-color: #d1d5db;
}

.dharma-talk-title {
    color: #8B4513;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem; /* Increased margin for better spacing */
    line-height: 1.3;
}

.dharma-talk-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease-in-out;
}

.dharma-talk-link:hover {
    color: #6D4C41; /* Slightly darker brown on hover */
    text-decoration: none;
}

.dharma-talk-excerpt {
    line-height: 1.7; /* Improved line height for readability */
    margin-bottom: 1.5rem; /* Increased margin */
    color: #374151;
    font-size: 1rem;
}

.dharma-talk-date {
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 0;
    font-weight: 500;
}

/* Responsive adjustments for dharma talks cards */
@media (max-width: 768px) {
    .dharma-talk-card {
        padding: 2.75rem 2rem; /* Ensure minimum 40px (2.5rem) top/bottom */
    }
    
    .dharma-talks-grid {
        gap: 1.5rem;
    }
    
    .dharma-talk-card:hover {
        transform: scale(1.05); /* Less dramatic scaling on mobile */
    }
}

@media (max-width: 480px) {
    .dharma-talk-card {
        padding: 2.5rem 1.5rem; /* Maintain 40px minimum even on small mobile */
    }
    
    .dharma-talk-title {
        font-size: 1.25rem;
    }
}

/* ===== NAVIGATION STYLING FIXES ===== */
/* Remove underlines from brand/logo link on hover */
header a.no-underline,
header a.no-underline:hover,
.flex.flex-col.no-underline,
.flex.flex-col.no-underline:hover {
    text-decoration: none ;
}

/* Ensure navigation menu items don't have underlines */
nav a.no-underline,
nav a.no-underline:hover,
nav a.hover\\:no-underline:hover {
    text-decoration: none ;
}

/* ===== SITE-WIDE PAGE SPACING CONSISTENCY ===== */
/* Apply homepage spacing standards to all pages */

/* Main content sections - ensure 2rem spacing */
.wp-block-post-content .wp-block-group[style*="padding-top:3rem"] {
    padding-top: 2rem ;
    margin-bottom: 2rem ;
}

/* Spacer elements - standardize to 2rem */
.wp-block-post-content .wp-block-spacer[style*="height:2rem"] {
    margin-bottom: 2rem ;
}

/* Heading sections - add proper spacing */
.wp-block-post-content .wp-block-heading + .wp-block-paragraph {
    margin-top: 1rem ;
}

/* Content paragraphs - consistent spacing */
.wp-block-post-content .wp-block-paragraph + .wp-block-paragraph {
    margin-top: 1.5rem ;
}

/* CRITICAL FIX: Empty paragraph spacing - ensure empty P tags provide visual spacing */
.wp-block-post-content p:empty {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    min-height: 1.5rem !important;
    display: block !important;
    line-height: 1.5rem !important;
}

/* ADDITIONAL CRITICAL FIX: Target all paragraph spacing with maximum specificity */
body.page-id-24 .wp-block-post-content p:empty,
body.page-id-24 .wp-site-blocks .wp-block-post-content p:empty,
.page-id-24 .wp-block-post-content p:empty {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
    min-height: 2rem !important;
    display: block !important;
    line-height: 2rem !important;
    visibility: visible !important;
}

/* Force regular paragraphs to have proper spacing too */
body.page-id-24 .wp-block-post-content p:not(:empty) {
    margin-bottom: 2rem !important;
}

/* Ensure the last several paragraphs have proper spacing */
body.page-id-24 .wp-block-post-content p:nth-last-child(-n+10) {
    margin-bottom: 2rem !important;
}

/* About page specific paragraph spacing enhancement */
.page-id-24 .wp-block-post-content p:not(:last-child) {
    margin-bottom: 2rem ;
}

/* Content paragraphs followed by headings */
.wp-block-post-content .wp-block-paragraph + .wp-block-heading {
    margin-top: 2rem ;
}

/* Hero section spacing consistency */
.wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] {
    margin-bottom: 2rem ;
}

/* Content section spacing */
.wp-block-post-content > .wp-block-group {
    margin-bottom: 2rem ;
}

/* Last content section - remove extra bottom margin */
.wp-block-post-content > .wp-block-group:last-child {
    margin-bottom: 0 ;
}

/* ===== SITE-WIDE TYPOGRAPHY CONSISTENCY ===== */
/* Match homepage typography standards across all pages */

/* Page headings - ensure consistent hierarchy */
.wp-block-post-content .wp-block-heading {
    font-family: var(--wp--preset--font-family--manrope) ;
    font-weight: 400 
    color: #2E8B57 
}

/* Page paragraphs - consistent with homepage */
.wp-block-post-content .wp-block-paragraph {
    font-family: var(--wp--preset--font-family--manrope) ;
    line-height: 1.8 ;
}

/* Hero intro text - match homepage styling */
.wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] .wp-block-paragraph {
    font-family: var(--wp--preset--font-family--manrope) ;
}

/* Content readability - match homepage max-width for paragraphs without inline max-width */
.wp-block-post-content .wp-block-paragraph:not([style*="max-width"]):not([class*="has-text-align-center"]) {
    max-width: 70ch ;
    margin-left: auto ;
    margin-right: auto ;
}

/* ===== PAGE TEMPLATE SPACING FIXES ===== */
/* Remove unwanted margin-top from H1 post title */
.wp-block-post-title.alignfull {
    margin-top: 0 ;
}

/* Remove unwanted margin-top from group after H1 */
main.wp-block-group .wp-block-group.alignfull {
    margin-top: 0 ;
}

/* Target specific page template structure */
main[style*="margin-top:0"] .wp-block-post-title {
    margin-top: 0 ;
}

main[style*="margin-top:0"] .wp-block-group.alignfull {
    margin-top: 0 ;
}

/* ===== FOOTER COPYRIGHT LAYOUT ===== */
/* Ensure copyright section works as narrow footnote band */
.wp-block-group[style*="justify-content:center"] {
    display: flex ;
    flex-wrap: wrap ;
    justify-content: center ;
    align-items: center ;
    gap: 1rem ;
}

/* When items wrap (mobile), center them */
@media (max-width: 768px) {
    .wp-block-group[style*="justify-content:center"] {
        justify-content: center ;
        text-align: center ;
    }
}

/* When items are on one line (desktop), space them out */
@media (min-width: 769px) {
    .wp-block-group[style*="justify-content:center"] {
        justify-content: space-around ;
    }
}

/* ===== FOOTER COPYRIGHT SPACING FIXES ===== */
/* Fix footer main container padding and remove negative margin */

/* Target the main footer container - fix excessive padding-bottom */
.wp-block-group[style*="background-color:#f9fafb"][style*="padding-top:3rem"] {
    padding-bottom: 1rem ;
}

/* Reduce excessive vertical spacing on medium and smaller screens */

/* Target the copyright section container */
@media (max-width: 768px) {
    .wp-block-group[style*="justify-content:center"][style*="margin-top:0.25rem"] {
        margin-top: 0.125rem ;
        margin-bottom: 0.125rem ;
        padding-top: 0.125rem ;
        padding-bottom: 0.125rem ;
    }
    
    /* Reduce separator margins as well */
    .wp-block-separator[style*="margin-top:0.25rem"] {
        margin-top: 0.125rem ;
        margin-bottom: 0.125rem ;
    }
}

/* Even tighter spacing for small mobile screens */
@media (max-width: 480px) {
    .wp-block-group[style*="justify-content:center"][style*="margin-top:0.25rem"] {
        margin-top: 0.0625rem ;
        margin-bottom: 0.0625rem ;
        padding-top: 0.0625rem ;
        padding-bottom: 0.0625rem ;
    }
    
    .wp-block-separator[style*="margin-top:0.25rem"] {
        margin-top: 0.0625rem ;
        margin-bottom: 0.0625rem ;
    }
}

/* ===== ABOUT PAGE 2-COLUMN LAYOUT ===== */
/* About page specific styling for 2-column hero layout */

/* Keep the original H1 but move it into the gray section */
body.page-id-24 .wp-block-post-title {
    margin-top: 0 ;
    margin-bottom: 0 ;
    background-color: #f9fafb ;
    padding: 4rem 2rem 0 2rem ;
    text-align: center ;
    /* Make background full width */
    margin-left: calc(-100vw / 2 + 50%) ;
    margin-right: calc(-100vw / 2 + 50%) ;
    width: 100vw ;
    max-width: none ;
    box-sizing: border-box ;
}

/* Fix white margins - ensure gray background extends full width */
body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] {
    margin-left: calc(-100vw / 2 + 50%) ;
    margin-right: calc(-100vw / 2 + 50%) ;
    width: 100vw ;
    max-width: none ;
    box-sizing: border-box ;
    margin-top: 0 ;
    padding: 0 0 4rem 0 ;
}

/* Main content wrapper - convert to flex container for 2-column layout */
body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] > div[style*="text-align:center"] {
    max-width: 1200px ;
    margin: 0 auto ;
    padding: 2rem ;
    display: flex ;
    flex-direction: row ;
    align-items: flex-start ;
    gap: 4rem ;
    text-align: left ;
}

/* Left column - Walt's photo */
body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] .wp-block-image {
    flex: 0 0 350px ;
    margin: 0 ;
    order: 1 ;
}

body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] .wp-block-image img {
    width: 320px ;
    height: auto ;
    border-radius: 12px ;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) ;
    object-fit: cover ;
}

/* Right column - Create wrapper for paragraphs */
body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] p {
    flex: 1 ;
    text-align: left ;
    margin-bottom: 1.5rem ;
    max-width: none ;
    order: 2 ;
}

/* Align H2 and paragraphs in the right column with maximum specificity */
body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] h2.wp-block-heading.has-text-align-center,
body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] h2.wp-block-heading,
body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] p:first-of-type,
body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] p:nth-of-type(2) {
    margin-left: 374px ;
    margin-right: 2rem ;
    text-align: left ;
    max-width: calc(100% - 374px - 2rem) ;
}

/* Desktop and larger screens - ensure 2-column layout */
@media (min-width: 1025px) {
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] > div[style*="text-align:center"] {
        flex-direction: row ;
        align-items: flex-start ;
        gap: 4rem ;
    }
    
    body.page-id-24 .wp-block-post-title {
        text-align: center ;
    }
}

/* Responsive: Stack on tablet and smaller screens */
@media (max-width: 1024px) {
    body.page-id-24 .wp-block-post-title {
        text-align: center ;
        padding: 3rem 2rem 0 2rem ;
    }
    
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] > div[style*="text-align:center"] {
        flex-direction: column ;
        gap: 2rem ;
        align-items: center ;
        text-align: center ;
    }
    
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] .wp-block-image {
        order: 1 ;
    }
    
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] p {
        text-align: center ;
        margin-left: 0 ;
    }
    
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] h2.wp-block-heading.has-text-align-center,
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] h2.wp-block-heading,
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] p:first-of-type,
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] p:nth-of-type(2) {
        margin-left: auto ;
        margin-right: auto ;
        text-align: center ;
        max-width: 100% ;
    }
}

/* Responsive: Small screens */
@media (max-width: 640px) {
    body.page-id-24 .wp-block-post-title {
        padding: 2rem 1rem 0 1rem ;
        font-size: clamp(2rem, 8vw, 3rem) ;
    }
    
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] > div[style*="text-align:center"] {
        padding: 2rem 1rem ;
    }
    
    body.page-id-24 .wp-block-post-content .wp-block-group[style*="background-color:#f9fafb"] .wp-block-image img {
        width: 240px ;
    }
}

/* ===== BLOCK PATTERN SUPPORT ===== */
/* Support for Tailwind classes in WordPress block patterns */

/* Hero Two-Column Pattern Support */
.hero-two-column .wp-block-group.flex {
    display: flex ;
}

.hero-two-column .wp-block-group.flex-col {
    flex-direction: column ;
}

.hero-two-column .wp-block-group.gap-8 {
    gap: 2rem ;
}

.hero-two-column .wp-block-group.space-y-6 > * + * {
    margin-top: 1.5rem ;
}

.hero-two-column .wp-block-group.text-center {
    text-align: center ;
}

.hero-two-column .wp-block-group.max-w-6xl {
    max-width: 72rem ;
}

.hero-two-column .wp-block-group.mx-auto {
    margin-left: auto ;
    margin-right: auto ;
}

.hero-two-column .wp-block-group.px-8 {
    padding-left: 2rem ;
    padding-right: 2rem ;
}

.hero-two-column .wp-block-image.flex-none {
    flex: none ;
}

.hero-two-column .wp-block-image.mx-auto {
    margin-left: auto ;
    margin-right: auto ;
}

.hero-two-column .wp-block-group.flex-1 {
    flex: 1 1 0% ;
}

/* Responsive classes for large screens */
@media (min-width: 1024px) {
    .hero-two-column .wp-block-group.lg\:flex-row {
        flex-direction: row ;
    }
    
    .hero-two-column .wp-block-group.lg\:items-start {
        align-items: flex-start ;
    }
    
    .hero-two-column .wp-block-group.lg\:gap-16 {
        gap: 4rem ;
    }
    
    .hero-two-column .wp-block-image.lg\:w-80 {
        width: 20rem ;
    }
    
    .hero-two-column .wp-block-image.lg\:mx-0 {
        margin-left: 0 ;
        margin-right: 0 ;
    }
    
    .hero-two-column .wp-block-group.lg\:text-left {
        text-align: left ;
    }
}

/* Typography classes */
.hero-two-column .text-3xl {
    font-size: 1.875rem ;
    line-height: 2.25rem ;
}

.hero-two-column .text-xl {
    font-size: 1.25rem ;
    line-height: 1.75rem ;
}

.hero-two-column .text-lg {
    font-size: 1.125rem ;
    line-height: 1.75rem ;
}

.hero-two-column .font-light {
    font-weight: 300 ;
}

.hero-two-column .leading-relaxed {
    line-height: 1.625 ;
}

.hero-two-column .mb-6 {
    margin-bottom: 1.5rem ;
}

.hero-two-column .mb-4 {
    margin-bottom: 1rem ;
}

/* Large screen typography */
@media (min-width: 1024px) {
    .hero-two-column .lg\:text-5xl {
        font-size: 3rem ;
        line-height: 1 ;
    }
}

/* ===== STICKY FOOTER LAYOUT ===== */
/* Make footer stick to bottom of viewport */

/* Set minimum height on body and create flex container */
body.wp-admin-bar-front body,
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Make main content area grow to fill space */
main.wp-block-group {
    flex: 1;
}

/* Ensure footer stays at bottom */
footer.wp-block-group,
.wp-block-template-part[data-type="footer"] {
    margin-top: auto;
}

/* WordPress site container adjustments */
.wp-site-blocks {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== SPECIFICITY DOCUMENTATION ===== */
/*
Specificity Hierarchy Used:
- 0,4,1: .wp-site-blocks .wp-block-post-content .wp-block-group .element
- 0,4,0: .wp-site-blocks .wp-block-post-content .wp-block-group .wp-block-class
- 0,3,2: .wp-block-group[attr][class] + element
- 0,3,1: main.wp-block-group .wp-block-group.class
- 0,3,0: .wp-site-blocks .wp-block-post-content .specific-selector

Two-Column Hero Layout Additions:
- Page-specific selectors: body.page-events, body.page-dharma-talks, page-id-24 (About)
- CSS Grid for layout control with responsive fallbacks
- Walt photo component integration across all layout types
- About page 2-column flex layout with responsive stacking
- Block Pattern Support: .hero-two-column class with Tailwind utility classes

This hierarchy ensures overrides work without  declarations
while maintaining WordPress's semantic class structure.
*/