/*
Theme Name: Centarus
Theme URI: https://centarusps.net/
Author: Centarus Companies
Description: Custom theme porting the Centarus Legal Services brochure site (dark/gold luxury design) to WordPress. Full-width page templates plus standard post templates. Requires Yoast SEO and Contact Form 7.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: centarus
*/

/* Runtime CSS lives in assets/css/main.css (shared) and assets/css/home.css
   (front page only), enqueued from functions.php. This file only carries the
   WordPress theme header above plus a few WP-admin/editor niceties below. */

.wp-caption { max-width: 100%; }
.screen-reader-text {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* -------------------------------------------------------------------------
 * Contact Form 7 normalisation. CF7 wraps every field in an extra <p> (with
 * default margins), a <br> after the label, and a control-wrap <span>, plus a
 * hidden-field container and a response-output block. Strip that chrome so the
 * rendered form matches the source form's spacing exactly:
 * .form-group { margin-bottom:25px } / label(display:block, margin-bottom:10px).
 * ---------------------------------------------------------------------- */
.contact-form .form-group { margin-bottom: 25px; }
.contact-form form p { margin: 0; }        /* CF7 wraps every control in a <p> */
.contact-form .form-group br { display: none; }
.contact-form .form-group label { margin-bottom: 10px; }
.contact-form .wpcf7-form-control-wrap { display: block; }
.contact-form .wpcf7-response-output { margin: 0 !important; }
.contact-form fieldset { border: 0; margin: 0; padding: 0; }
/* CF7's textarea defaults to ~10 rows; source uses a fixed 150px height. */
.contact-form textarea { height: 150px; min-height: 150px; }
/* Source submit is a full-width <button style="width:100%">; CF7 emits an
 * auto-width <input type="submit">. Restore full width. */
.contact-form input[type="submit"].btn-primary { width: 100%; }

/* -------------------------------------------------------------------------
 * Empty media columns. A .two-col section pairs text with a .col-media image
 * or video. If an editor adds/edits a section and leaves the media column
 * empty (no img/video), hide the empty box and let the text span the full
 * width instead of sitting beside a dead half-width column. Kept here (not in
 * the source-extracted main.css) so it survives a content rebuild. Selectors
 * avoid nested :has(), which browsers do not support.
 * ---------------------------------------------------------------------- */
.col-media:not(:has(img, video, iframe, picture, svg)) {
    display: none;
}
.two-col:has(> .col-media):not(:has(> .col-media img, > .col-media video, > .col-media iframe, > .col-media picture, > .col-media svg)) {
    grid-template-columns: 1fr;
}
