/*
Theme Name: SRA Theme
Theme URI: https://srarchitects.co.uk
Author: Migration Agent
Description: WordPress theme replicating the SR Architects Joomla site.
Version: 1.2.1
Text Domain: sra-theme
*/

/* Bootstrap 3 base from original template */
@import url('css/bootstrap.min.css');
@import url('css/style.css');
@import url('css/template.min.css');

/* WordPress-specific helpers */
.wp-caption,
.gallery-caption {
    max-width: 100%;
}

.alignleft {
    float: left;
    margin: 0 15px 15px 0;
}

.alignright {
    float: right;
    margin: 0 0 15px 15px;
}

.aligncenter {
    display: block;
    margin: 0 auto 15px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Ensure main content area matches original layout */
#primary {
    padding-top: 0;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

/* Contact page hero: make the video and address columns equal height.
   Core Gutenberg gives the address column align-self:center (it only
   reaches its content height), so override to stretch and re-centre
   its content with flexbox. The video column fills its box with
   object-fit:cover so neither side shows a gap when the other is
   taller. Scoped via :has() so it only matches the columns block
   containing the video. */
.wp-block-columns:has(.wp-block-video) > .wp-block-column {
    display: flex;
    flex-direction: column;
}

.wp-block-columns:has(.wp-block-video) .wp-block-column.is-vertically-aligned-center {
    align-self: stretch;
    justify-content: center;
}

.wp-block-columns:has(.wp-block-video) .wp-block-video {
    display: flex;
    flex: 1 1 auto;
    margin: 0;
}

.wp-block-columns:has(.wp-block-video) .wp-block-video video {
    flex: 1 1 auto;
    width: 100%;
    object-fit: cover;
}
