/* Colourbill custom styles */

/* ============================================================
   Sticky Header — branding scrolls away, nav stays
   ============================================================ */

header#masthead {
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* Hide branding once scrolled; keep nav/hamburger visible */
header#masthead.shrunk > .content-wrap {
    display: none;
}

header#masthead.shrunk {
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

/* Anchor offset — JS overrides this dynamically once scroll state is known */
#color-technology,
#blog {
    scroll-margin-top: 60px;
}

/* ============================================================
   Mobile menu: hamburger icon, no "Menu" text, compact panel
   ============================================================ */

/* Replace "Menu" text with ☰ icon — keep original padding/layout intact */
.super-menu .toggle-mobile-menu,
.smenu-hide.toggle-mobile-menu {
    font-size: 0 !important;
}
.super-menu .toggle-mobile-menu::before,
.smenu-hide.toggle-mobile-menu::before {
    content: "☰";
    font-size: 22px;
    display: inline-block;
    position: static;    /* Override theme's position:absolute that pushes icon below bar */
    line-height: inherit;
    font-family: inherit;
}

/* Prevent page from shifting right / jumping to top when mobile menu opens.
   Theme default translates #page by 70% and sets position:fixed, which loses
   scroll position on close. Override to keep the page stationary. */
.mobile-menu-active #page {
    position: static !important;
    transform: none !important;
    right: auto !important;
}

/* Spacing between ☰ close-button and menu items inside the open panel */
#smobile-menu .smenu-hide.toggle-mobile-menu {
    padding-bottom: 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 4px;
    display: block;
}

/* Narrow the slide-in menu panel to fit content */
#smobile-menu {
    width: auto !important;
}
#smobile-menu .content-wrap,
#smobile-menu .primary-menu ul {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}
#smobile-menu.show .main-navigation {
    width: auto !important;
    float: none !important;
    min-width: 120px;
}
#smobile-menu.show .main-navigation ul li {
    width: auto !important;
}
#smobile-menu.show .main-navigation ul li a {
    white-space: nowrap;
}

/* ============================================================
   Mobile menu: shorten "Color Technology" to "Color"
   ============================================================ */

@media screen and (max-width: 1023px) {
    li.menu-color-technology > a {
        font-size: 0 !important;
        letter-spacing: 0;
    }
    li.menu-color-technology > a::after {
        content: "Color";
        font-size: 14px;
        letter-spacing: normal;
    }
}

/* Post-specific image sizing */
.postid-68 .featured-thumbnail img {
    width: 33%;
    height: auto;
}

/* ============================================================
   Front Page Sections
   ============================================================ */

.fp-section {
    width: 100%;
    box-sizing: border-box;
}

.fp-section-heading {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom: 3px solid #000;
    padding-bottom: 10px;
    margin: 0 0 28px;
}

/* Color Technology: distinct boxed section */
.fp-section-colortech {
    background: #eef2f7;
    border: 2px solid #5a6e8c;
    border-radius: 4px;
    padding: 28px 28px 32px;
    margin-bottom: 44px;
    box-shadow: 0 2px 8px rgba(44, 62, 90, 0.08);
}

.fp-section-heading--colortech {
    border-bottom-color: #5a6e8c;
    color: #2c3e5a;
}

/* Blog section */
.fp-section-blog {
    padding-top: 4px;
}

/* chardata app card */
.fp-app-card {
    background: #fff;
    border: 1px solid #c4d0e0;
    border-left: 4px solid #5a6e8c;
    padding: 20px 22px;
    margin-bottom: 28px;
    border-radius: 3px;
}

.fp-app-card__title {
    font-size: 1em;
    font-weight: 700;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2c3e5a;
}

.fp-app-card__desc {
    font-size: 0.92em;
    color: #444;
    margin: 0 0 14px;
    line-height: 1.6;
}

.fp-app-card__link {
    display: inline-block;
    background: #2c3e5a;
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 18px;
    font-size: 0.88em;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 2px;
    transition: background 0.2s;
}

.fp-app-card__link:hover {
    background: #5a6e8c;
}

.fp-app-card__repo {
    display: inline-block;
    margin-left: 12px;
    font-size: 0.88em;
    color: #2c3e5a !important;
    text-decoration: none !important;
    border-bottom: 1px solid #5a6e8c;
    padding-bottom: 1px;
}

.fp-app-card__repo:hover {
    color: #5a6e8c !important;
}

.fp-no-posts {
    color: #666;
    font-style: italic;
}

/* ============================================================
   chardata Release Notes Card
   ============================================================ */

.fp-release-card {
    background: #fff;
    border: 1px solid #c4d0e0;
    border-left: 4px solid #2c3e5a;
    padding: 20px 22px;
    margin-bottom: 28px;
    border-radius: 3px;
}

.fp-release-card__title {
    font-size: 1em;
    font-weight: 700;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2c3e5a;
}

/* Latest release: lightly shaded to distinguish it */
.fp-release-item--latest {
    background: #f4f7fb;
    border: 1px solid #d0daea;
    border-radius: 3px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.fp-release-item {
    padding: 14px 0;
    border-top: 1px solid #e0e6ef;
}

.fp-release-item:first-child,
.fp-release-item--latest {
    border-top: none;
}

.fp-release-item__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.fp-release-item__tag {
    font-size: 0.82em;
    font-weight: 700;
    background: #2c3e5a;
    color: #fff;
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 0.04em;
}

.fp-release-item__date {
    font-size: 0.82em;
    color: #666;
}

.fp-release-item__name {
    font-size: 0.88em;
    color: #2c3e5a;
    font-weight: 600;
}

.fp-release-item__body {
    font-size: 0.88em;
    color: #444;
    line-height: 1.6;
    margin-bottom: 10px;
}

.fp-release-item__body p {
    margin: 0 0 6px;
}

.fp-release-item__body ul {
    margin: 0 0 6px;
    padding-left: 1.4em;
}

.fp-release-item__body li {
    margin-bottom: 3px;
}

.fp-release-item__body code {
    background: #eef2f7;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 0.95em;
}

.fp-release-item__link {
    font-size: 0.82em;
    color: #2c3e5a !important;
    text-decoration: none !important;
    border-bottom: 1px solid #5a6e8c;
    padding-bottom: 1px;
}

.fp-release-item__link:hover {
    color: #5a6e8c !important;
}

/* "Older releases" collapsible */
.fp-release-older {
    margin-top: 8px;
}

.fp-release-older__toggle {
    font-size: 0.85em;
    color: #2c3e5a;
    cursor: pointer;
    padding: 4px 0;
    list-style: none;
    user-select: none;
}

.fp-release-older__toggle::-webkit-details-marker {
    display: none;
}

.fp-release-older__toggle::before {
    content: "▶ ";
    font-size: 0.75em;
}

details[open] .fp-release-older__toggle::before {
    content: "▼ ";
}
