/*
Theme Name: 	Bill Piotrowski Portfolio
Theme URI: 		https://billpiotrowski.com/
Description: 	A simple custom theme.
Author: 		Bill Piotrowski
Author URI: 	https://billpiotrowski.com/
License: 		Proprietary – copyright.
License URI: 	n/a
Template: 		
Version: 		0.1.0
*/


/* Mobile First Layout (1 Column) */

.swiss-grid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--wp--style--block-gap, 1.5rem); 
}

.main-view{
    min-height: 36rem;
}

/* Zero out local margins so the Grid Gap is the only source of truth */
.swiss-grid > * {
    margin-block-start: 0;
    margin-block-end: 0;
}

.swiss-grid > h2 {
        margin-top: 2.5rem;
        border-top: 1px solid currentColor;
        padding-top: 1rem;
}

/* Hacky solution to first child margin 0. */
:root .swiss-grid:where(.is-layout-flow) > :first-child {
	margin-block-start: 2.5rem;
}
:root .swiss-grid:where(.is-layout-flow) > * {
    margin-block-start: 0 !important;
}

/* Desktop Layout (5 Columns) */
@media (min-width: 1024px) {
    .swiss-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--wp--style--block-gap, 1.5rem); 
        
        grid-template-columns: repeat(5, 1fr);
        grid-template-columns: 2.5fr 2.5fr 2.5fr 2.5fr 0.5fr;
        column-gap: 2rem;

        /* padding: 0 2rem; */
        padding-left: 5rem; 
        padding-right: 5rem; 
    }

    .swiss-grid.wp-block-post-content {
        display: grid !important;
    }

    /* --- Default: Body Copy (Cols 2-3) --- */
    /* This catch-all handles paragraphs, lists, h3-h6, code blocks, etc. */
    .swiss-grid > * {
        grid-column: 2 / span 2;
    }

    /* --- Exception: Major Headers (Col 1) --- */
    
    .swiss-grid > h1 {
        grid-column: 2 / span 3; /* Spans Cols 2, 3, 4 */
    }

    /* Only H2 sits in the left gutter as a section marker */
    .swiss-grid > h2 {
        grid-column: 1 / span 1;
        /* Height set to zero in case h2 is taller than the next element
        causing an awkward gap. */
        height: 0;
    }

    .swiss-grid > h2,
    .swiss-grid > h2 + * {
        border-top: 1px solid currentColor;
        padding-top: 1rem;
        margin-top: 2.5rem;
    }

    /* --- Exception: Media & Asides (Cols 4-5) --- */
    .swiss-grid > figure {
        grid-column: 2 / span 3;
        /* Enable Subgrid magic */
        display: grid;
        grid-template-columns: subgrid;
        
        /* Zero out default figure margins so it aligns perfectly */
        margin: 0; 
        
    }
    /* 2. Target the Image (Grandchild) */
    .swiss-grid > figure > :not(figcaption) {
        grid-column: 1 / span 2;
        width: 100%;
        height: auto;
    }

    /* The Caption */
    .swiss-grid > figure > figcaption {
        grid-column: 3 / span 1;
        align-self: start;
        margin: 0;
    }
}

.header{
    padding: 6rem 0 0;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    list-style: none;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    font-weight: 400; /* Match look of headers usually */
    padding: 0; /* Handled by parent .swiss-grid */
    text-transform: lowercase;
}

.breadcrumb-nav li {
    display: inline-block;
}

.breadcrumb-nav a {
    text-decoration: none;
    color: inherit;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
    color: var(--wp--preset--color--custom-link);
}

#placard {
    max-width: 17rem;
}

#placard h2{
  border-bottom: 1px solid #9AA7A3;
}