/*
Theme Name: Twenty Twenty-Five Child
Template: twentytwentyfive
Description: Child theme for documentation site with collapsible headers
Version: 1.0
*/

/* Collapsible headers */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    cursor: pointer;
    position: relative;
    padding-left: 40px;
    user-select: none;
    transition: color 0.2s ease;
}

.entry-content h2:hover,
.entry-content h3:hover,
.entry-content h4:hover {
    color: #2271b1;
}

.entry-content h2:before,
.entry-content h3:before,
.entry-content h4:before {
    content: '▶';
    position: absolute;
    left: 15px;
    top: 0.3em;
    font-size: 0.7em;
    transition: transform 0.3s ease;
    color: #666;
}

.entry-content h2:not(.collapsed):before,
.entry-content h3:not(.collapsed):before,
.entry-content h4:not(.collapsed):before {
    transform: rotate(90deg);
}

.entry-content .collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.entry-content .collapsible-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

/* List spacing improvements */
.entry-content ul.list-pages-shortcode,
.entry-content ul.child-pages {
    line-height: 1.6;
}

.entry-content ul.list-pages-shortcode li,
.entry-content ul.child-pages li {
    margin-bottom: 8px;
}

.entry-content ul.list-pages-shortcode ul,
.entry-content ul.child-pages ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

.entry-content ul.list-pages-shortcode a,
.entry-content ul.child-pages a {
    text-decoration: none;
    color: #2271b1;
    transition: color 0.2s ease;
}

.entry-content ul.list-pages-shortcode a:hover,
.entry-content ul.child-pages a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Step numbers */
.entry-content .step-number {
    font-weight: bold;
    color: #2271b1;
    margin-right: 5px;
}

/* Reduce side whitespace on documentation pages */
.wp-block-post-content.has-global-padding {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
}

main.wp-block-group {
    max-width: 1400px !important;
}

/* Align images with header text (after arrow and number) */
.entry-content .collapsible-content figure,
.entry-content .collapsible-content img {
    margin-left: 40px;
}

/* Align page title with content - compensate for parent padding */
.wp-block-post-title {
    margin-left: -30px !important;
    margin-bottom: 30px !important;
}

/* Mobile responsive - reduce header font sizes */
@media (max-width: 768px) {
    .entry-content h2 {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .entry-content h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .entry-content h4 {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .wp-block-post-title {
        font-size: 1.5rem;
    }
    
    /* Remove left margin on images for mobile to prevent cutoff */
    .entry-content .collapsible-content figure,
    .entry-content .collapsible-content img {
        margin-left: 0 !important;
        max-width: 100%;
        height: auto;
    }
    
    /* Ensure images scale properly */
    .entry-content .collapsible-content figure img {
        width: 100%;
        height: auto;
    }
}
