/*
Theme Name: Bootstrap 5 Base Theme
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: A solid WordPress starter theme built on Bootstrap 5. Use this as a base for custom theme development. Bootstrap 5 assets are served from /assets/.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bs5-base
Tags: bootstrap, starter, base, developer, custom, responsive
*/

/* ============================================================
   THEME BASE STYLES
   (Bootstrap is loaded via /assets/css/bootstrap.min.css)
   ============================================================ */

/* --- WordPress Core Fixes ---------------------------------- */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }
.alignwide  { margin-left: -2rem; margin-right: -2rem; }
.alignfull  { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

/* --- WordPress Captions ------------------------------------ */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .875rem; color: #6c757d; text-align: center; margin-top: .25rem; }

/* --- Sticky post ------------------------------------------ */
.sticky .card { border-left: 4px solid var(--bs-primary); }

/* --- Screen reader text ------------------------------------ */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    background-color: #fff;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 1rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: .75rem 1.25rem;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* --- Skip link --------------------------------------------- */
.skip-link { position: absolute; top: -100%; left: 1rem; z-index: 9999; }
.skip-link:focus { top: 1rem; }

/* --- WP admin bar spacing ---------------------------------- */
.admin-bar .navbar.fixed-top { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .navbar.fixed-top { top: 46px; }
}

/* --- Smooth scroll ----------------------------------------- */
html { scroll-behavior: smooth; }

/* --- Main content min-height (prevents short-page collapse) */
#main { min-height: 60vh; }

/* --- WordPress block editor styles ------------------------- */
.wp-block-image img { max-width: 100%; height: auto; }
.wp-block-separator { border-color: var(--bs-border-color); }

/* --- Custom utility: text balance -------------------------- */
.text-balance { text-wrap: balance; }

/* --- Entry typography ------------------------------------- */
.entry-content > * + * { margin-top: 1.25rem; }
.entry-content img { max-width: 100%; height: auto; border-radius: var(--bs-border-radius); }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }
.entry-content a { text-decoration: underline; }
.entry-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bs-light);
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

/* --- Pagination ------------------------------------------- */
.pagination .page-link { color: var(--bs-primary); }
.pagination .page-item.active .page-link { background-color: var(--bs-primary); border-color: var(--bs-primary); }

/* --- Comments --------------------------------------------- */
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 2rem; }
.comment-respond { margin-top: 2rem; }

/* --- Widgets ---------------------------------------------- */
.widget { margin-bottom: 2rem; }
.widget-title { border-bottom: 2px solid var(--bs-primary); padding-bottom: .5rem; margin-bottom: 1rem; }
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: .25rem 0; border-bottom: 1px solid var(--bs-border-color); }
.widget ul li:last-child { border-bottom: none; }

/* --- Footer ----------------------------------------------- */
#colophon { background-color: var(--bs-dark); color: var(--bs-light); }
#colophon a { color: rgba(255,255,255,.75); }
#colophon a:hover { color: #fff; }

/* --- Gutenberg editor colors ------------------------------ */
:root {
    --wp--preset--color--primary:   var(--bs-primary);
    --wp--preset--color--secondary: var(--bs-secondary);
    --wp--preset--color--light:     var(--bs-light);
    --wp--preset--color--dark:      var(--bs-dark);
}
