/*
 Theme Name:   Cri-One
 Theme URI:    https://cri-one.com
 Description:  Cri-One.com theme — Bootstrap-based, accordion sections (Art / Invent / Music), clean header and three-column footer. Art, life, and digital presentation.
 Author:       Christopher G. Brown
 Author URI:   https://cri-one.com
 Version:      1.0.0
 License:      GPL v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  cri-one
*/

/* Base: rem/em for layout and type; px only for borders and media. Prevents mixed-unit “off” look. */
html {
    overflow-x: clip;
    box-sizing: border-box;
    font-size: 100%;
}
*,
*::before,
*::after {
    box-sizing: inherit;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    line-height: 1.6;
    position: relative;
    z-index: 0;
    background: #fff;
}

/* Content width: rem-based max so layout scales; full width up to that cap */
.cri-one-header .container,
.cri-one-main .container {
    max-width: 90rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 36em) {
    .cri-one-header .container,
    .cri-one-main .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Main: stay in flow below header, no overlap */
.cri-one-main {
    position: relative;
    z-index: 0;
    min-height: 0;
    overflow-x: clip;
}

/* Single post: clear stacking so TOC and content don't overlap; 15rem right column */
.single .container.has-sidebar {
    overflow-x: clip;
}
.single .container.has-sidebar .row.cri-one-article-row {
    position: relative;
    overflow-x: clip;
    display: flex;
    flex-wrap: wrap;
}
.single .container.has-sidebar .cri-one-article-content-col {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    z-index: 1;
    overflow-x: clip;
}
.single .container.has-sidebar .cri-one-article-right {
    flex: 0 0 15rem;
    width: 15rem;
    max-width: 15rem;
    padding-left: 1rem;
    display: none;
}
@media (min-width: 62em) {
    .single .container.has-sidebar .cri-one-article-right {
        display: block;
    }
}
.single .cri-one-article-right .cri-one-tag-crowd {
    position: sticky;
    top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 0.5rem;
}
.single .cri-one-article-right .cri-one-tag-crowd .widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}
.single .cri-one-article-right .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.single .cri-one-article-right .tagcloud .tag-link {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    color: #002a8b;
    text-decoration: none;
}
.single .cri-one-article-right .tagcloud .tag-link:hover {
    background: #f0f0f0;
    border-color: #002a8b;
    color: #05f;
}
.single #cri-one-toc-wrap {
    position: relative;
    z-index: 0;
    min-width: 0;
}
.single .cri-one-toc {
    position: sticky;
    top: 1rem;
}
/* Sticky TOC below WordPress admin bar when present (rem-based) */
.admin-bar .single .cri-one-toc {
    top: calc(1rem + 2rem);
}
@media (min-width: 48.9375em) {
    .admin-bar .single .cri-one-toc {
        top: calc(1rem + 2.875rem);
    }
}
/* Article and entry-content: contain layout */
.single article,
.single .entry-content {
    position: relative;
    overflow-x: clip;
}

a {
    color: #002a8b;
}
a:hover {
    color: #05f;
}

/* Header: site identity; prevent overlap with content and floating divs */
.cri-one-header {
    position: relative;
    z-index: 100;
    padding: 1.5rem 0;
    border-bottom: 2px dotted #ddd;
    margin-bottom: 1.5rem;
    background: #fff;
    width: 100%;
}
.cri-one-header .container {
    position: relative;
    z-index: 1;
}
.cri-one-header .d-flex {
    flex-wrap: wrap;
    min-width: 0;
}
.cri-one-header .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}
.cri-one-header .site-description {
    font-size: 0.95rem;
    color: #555;
    margin: 0.25rem 0 0;
}
/* Nav in header: contain so it doesn't overlap or push layout */
.cri-one-header .nav {
    min-width: 0;
    flex-shrink: 1;
}
/* Single-line scroll mode only (when not using --wrap) */
.cri-one-header .lcus-scroll-menu-wrap:not(.lcus-scroll-menu-wrap--wrap) .navbar-nav {
    flex-wrap: nowrap;
    white-space: nowrap;
}
/* Wrapping header nav: flex row with gap */
.cri-one-header .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.cri-one-header .navbar-nav a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: inherit;
}
.cri-one-header .navbar-nav a:hover {
    text-decoration: underline;
}
/* When admin bar is present, keep header below it */
.admin-bar .cri-one-header {
    top: 0;
}

/* Content by cri-one */
.cri-one-content-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Accordion / collapse sections (Art, Invent, Music style) */
.cri-one-accordion .card {
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}
.cri-one-accordion .card-header {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 0.75rem 1rem;
}
.cri-one-accordion .card-header button {
    font-weight: 600;
    color: #333;
    text-decoration: none;
}
.cri-one-accordion .card-header button:hover {
    color: #002a8b;
}
.cri-one-accordion .card-body {
    padding: 1rem;
}

/* Image cards (art grid): rem so they scale with layout */
.cri-one-card-img {
    max-width: 18.75rem;
    height: auto;
    border-radius: 0.25rem;
}
.cri-one-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Footer: WHO I AM, GET IN TOUCH, NEWSLETTER */
.cri-one-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 2px dotted #ddd;
    background: #f9f9f9;
}
.cri-one-footer h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: #333;
}
.cri-one-footer .widget {
    margin-bottom: 1.5rem;
}

/* Buttons: match cri-one blue */
.btn-primary,
.cri-one-btn {
    background-color: #002a8b;
    border-color: #002a8b;
    color: #fff;
}
.btn-primary:hover,
.cri-one-btn:hover {
    background-color: #05f;
    border-color: #05f;
    color: #fff;
}

/* Pagination */
.cri-one-pagination-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.cri-one-pagination-nav .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}
.cri-one-pagination-nav .page-numbers {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 600;
}
.cri-one-pagination-nav .page-numbers:hover {
    background: #f0f0f0;
    border-color: #002a8b;
    color: #002a8b;
}
.cri-one-pagination-nav .page-numbers.current {
    background: #002a8b;
    border-color: #002a8b;
    color: #fff;
}
.cri-one-pagination-nav .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}
.cri-one-pagination-nav .page-numbers.prev,
.cri-one-pagination-nav .page-numbers.next {
    font-size: 0.95rem;
}

/* Table of contents (single post) */
.cri-one-toc {
    position: sticky;
    top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 0.5rem;
}
.cri-one-toc__title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}
.cri-one-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}
.cri-one-toc__item {
    margin-bottom: 0.35rem;
}
.cri-one-toc__item--sub {
    margin-left: 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}
.cri-one-toc__link {
    color: #002a8b;
    text-decoration: none;
}
.cri-one-toc__link:hover {
    color: #05f;
    text-decoration: underline;
}
@media (max-width: 61.99875em) {
    .cri-one-toc {
        position: static;
    }
}

/* Keyboard focus: visible outline so focus is never invisible (suggestion #5) */
a:focus-visible,
button:focus-visible,
.cri-one-accordion .accordion-button:focus-visible,
.cri-one-header .navbar-nav a:focus-visible,
.cri-one-toc__link:focus-visible,
.cri-one-pagination-nav .page-numbers:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #002a8b;
    outline-offset: 0.2rem;
}
/* Skip link: show on focus */
.cri-one-skip-link {
    position: absolute;
    top: -4rem;
    left: 1rem;
    z-index: 10000;
    padding: 0.5rem 1rem;
    background: #002a8b;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.25rem;
    transition: top 0.2s ease;
}
.cri-one-skip-link:focus {
    top: 1rem;
    outline: 2px solid #05f;
    outline-offset: 0.2rem;
}
