/* Show the appropriate member sign-in action in the Elementor header. */
body.logged-in .elementor-location-header a[data-interaction-id="ed8d971"] { display: none !important; }
body:not(.logged-in) .elementor-location-header a[data-interaction-id="e44cb8a"] { display: none !important; }

/* Show forum links and index only to signed-in members. */
body:not(.logged-in).page-id-16 main a[href="/forums/"],
body:not(.logged-in).page-id-13 main .bbp-forums { display: none !important; }

/* Light full-width page title bands. */
body.page:not(.home):not(.page-id-53) main.site-main > .page-header {position:relative;isolation:isolate;padding:clamp(2rem,4vw,3.5rem) 0;margin-bottom:clamp(1.5rem,3vw,2.5rem)}
body.page:not(.home):not(.page-id-53) main.site-main > .page-header:before {content:'';position:absolute;z-index:-1;inset:0 calc(50% - 50vw);background:#eaf3f9;border-bottom:1px solid #d4e5f1}
body.page:not(.home):not(.page-id-53) main.site-main > .page-header .entry-title {margin:0;color:#15324d;font-size:clamp(2rem,4vw,3.1rem);line-height:1.15;font-weight:700}
@media(max-width:1180px){body.page:not(.home):not(.page-id-53) main.site-main > .page-header{padding-left:1.25rem;padding-right:1.25rem}}
@media(min-width:1181px){body.page:not(.home):not(.page-id-53) main.site-main > .page-header{padding-left:3rem;padding-right:3rem}}
/* Compact title bands: about half the previous height. */
/* Compact shared footer. */
.elementor-location-footer [data-id="1b59c0f"]{padding:40px 48px 20px;gap:20px}
.elementor-location-footer [data-id="813d29a"]{padding-top:12px}
@media(min-width:768px){.elementor-location-footer [data-id="2ea8943"]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:24px}.elementor-location-footer [data-id="2ea8943"]>[data-id="3c09a35"],.elementor-location-footer [data-id="2ea8943"]>[data-id="01cafc0"]{width:auto}}
@media(max-width:767px){.elementor-location-footer [data-id="1b59c0f"]{padding:28px 20px 16px;gap:16px}}
/* Let short pages fill the viewport and keep the footer at its bottom. */
body.page{display:flex;flex-direction:column;min-height:100vh}
body.page.admin-bar{min-height:calc(100vh - 32px)}
body.page>main{flex:1 0 auto}
@media(max-width:782px){body.page.admin-bar{min-height:calc(100vh - 46px)}}
body.page:not(.home):not(.page-id-53) main.site-main > .page-header{padding-top:0.85rem;padding-bottom:0.85rem}

/* CAS Sky Diary archive — left padding */
body.page-id-12 .cas-sd-latest,
body.page-id-12 .cas-sd-archive {
    padding-left: 25px !important;
    box-sizing: border-box;
}

/* CAS Image Visibility — horizontal radio buttons */
.bf_field_group.elem-image_visibility .bf-input > .radio {
    display: inline-block !important;
    margin-right: 25px !important;
    vertical-align: middle;
}

/* CAS Deep Space Blue — main page backgrounds */
body.page main.site-main,
body.page main.site-main > .page-content {
    background-color: #0B1420 !important;
    color: #E8EDF2 !important;
}

/* Dark title band */
body.page:not(.home):not(.page-id-53)
main.site-main > .page-header::before {
    background: #162333 !important;
    border-bottom: 1px solid #304050 !important;
}

body.page:not(.home):not(.page-id-53)
main.site-main > .page-header .entry-title {
    color: #F4F7FB !important;
}

/* Main content text */
body.page main.site-main > .page-content p,
body.page main.site-main > .page-content h2,
body.page main.site-main > .page-content h3 {
    color: #E8EDF2 !important;
}

/* CAS Deep Space Blue — full-width layout fix */

/* Dark background across the entire page */
body.page:not(.home) {
    background-color: #0B1420 !important;
}

/* Restore comfortable content spacing */
body.page:not(.home) main.site-main > .page-content {
    padding: 35px 30px 60px !important;
    box-sizing: border-box;
}

/* Blue meeting filter buttons */
body.page-id-9 .caswf-filter a {
    color: #72B9E7 !important;
    border-color: #304050 !important;
}

body.page-id-9 .caswf-filter a:hover {
    background-color: #23618B !important;
    color: #FFFFFF !important;
}

/* CAS — Compact About page title bar */
body.page-id-1 main.site-main > .page-header {
    min-height: 0 !important;
    height: auto !important;
    padding: 14px 30px !important;
    margin: 0 0 30px !important;
}

body.page-id-1 main.site-main > .page-header .entry-title {
    font-size: 32px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

/* CAS — Centre About page title */
body.page-id-1 main.site-main > .page-header {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center !important;
    box-sizing: border-box;
}

body.page-id-1 main.site-main > .page-header .entry-title {
    text-align: center !important;
    width: 100% !important;
}

/* CAS — Deep Teal title bar: About page */

body.page-id-1 main.site-main > .page-header::before {
    background: #143D4A !important;
    border-bottom: 1px solid #286070 !important;
}

body.page-id-1 main.site-main > .page-header {
    background-color: #143D4A !important;
}

body.page-id-1 main.site-main > .page-header .entry-title {
    color: #FFFFFF !important;
}

/* CAS — Deep Teal title bars across the website */

body.page:not(.home):not(.page-id-53)
main.site-main > .page-header {
    background: #143D4A !important;
}

body.page:not(.home):not(.page-id-53)
main.site-main > .page-header::before {
    background: #143D4A !important;
    border-bottom: 1px solid #286070 !important;
}

body.page:not(.home):not(.page-id-53)
main.site-main > .page-header .entry-title {
    color: #FFFFFF !important;
}

/* CAS — Deep Teal centred gradient title bars */

body.page:not(.home):not(.page-id-53)
main.site-main > .page-header,
body.page:not(.home):not(.page-id-53)
main.site-main > .page-header::before {
    background: linear-gradient(
        90deg,
        #091A24 0%,
        #143D4A 25%,
        #267487 50%,
        #143D4A 75%,
        #091A24 100%
    ) !important;
}

body.page:not(.home):not(.page-id-53)
main.site-main > .page-header .entry-title {
    color: #FFFFFF !important;
}

/* CAS — Deep Space Blue for individual posts */

body.single-post {
    background: #0B1420 !important;
    color: #E8EDF2 !important;
}

body.single-post main,
body.single-post main.site-main,
body.single-post .site-main,
body.single-post article,
body.single-post .entry-content,
body.single-post .page-content {
    background-color: #0B1420 !important;
    color: #E8EDF2 !important;
}

/* Post title */
body.single-post .entry-title {
    color: #FFFFFF !important;
}

/* Descriptions and headings */
body.single-post .entry-content p,
body.single-post .entry-content li,
body.single-post .entry-content h2,
body.single-post .entry-content h3 {
    color: #E8EDF2 !important;
}

/* Links */
body.single-post .entry-content a {
    color: #72B9E7;
}

/* Preserve astronomical images */
body.single-post .entry-content img {
    background: transparent;
}

/* CAS Gallery — Darker image descriptions */

body.page-id-10 .cas-gallery p,
body.page-id-10 .cas-gallery .description,
body.page-id-10 .cas-gallery .excerpt {
    color: #334155 !important;
}

/* Author and date */
body.page-id-10 .cas-gallery .meta,
body.page-id-10 .cas-gallery .date {
    color: #64748B !important;
}

/* CAS Gallery — Improve text readability */

/* Image description */
.cas-gallery-card .cas-gallery-excerpt {
    color: #334155 !important;
}

/* Author and date */
.cas-gallery-card .cas-gallery-meta {
    color: #64748B !important;
}

/* Keep image title pink */
.cas-gallery-card-body h3,
.cas-gallery-card-body h3 a {
    color: #E91E63 !important;
}

/* CAS Gallery — Force readable card text */

body.page-id-10 .cas-gallery-grid
.cas-gallery-card .cas-gallery-card-body
p.cas-gallery-excerpt {
    color: #334155 !important;
    opacity: 1 !important;
}

body.page-id-10 .cas-gallery-grid
.cas-gallery-card .cas-gallery-card-body
p.cas-gallery-meta {
    color: #64748B !important;
    opacity: 1 !important;
}

/* CAS Members Area — Soft astronomy-blue links */
body.page-id-16 main.site-main .page-content a {
    color: #72B9E7 !important;
}

body.page-id-16 main.site-main .page-content a:hover {
    color: #B4DFFF !important;
}

/* Notification preference button */
body.page-id-16 main.site-main .page-content button,
body.page-id-16 main.site-main .page-content input[type="submit"] {
    color: #72B9E7 !important;
    border-color: #527E9D !important;
}

body.page-id-16 main.site-main .page-content button:hover,
body.page-id-16 main.site-main .page-content input[type="submit"]:hover {
    background-color: #23618B !important;
    color: #FFFFFF !important;
}

/* CAS My Images — Soft astronomy-blue links */

body.page-id-15 main.site-main .page-content a {
    color: #72B9E7 !important;
}

body.page-id-15 main.site-main .page-content a:hover {
    color: #B4DFFF !important;
}

/* Delete image buttons */
body.page-id-15 main.site-main .page-content button,
body.page-id-15 main.site-main .page-content input[type="submit"] {
    color: #72B9E7 !important;
    border-color: #527E9D !important;
}

/* Red hover for destructive actions */
body.page-id-15 main.site-main .page-content button:hover,
body.page-id-15 main.site-main .page-content input[type="submit"]:hover {
    background-color: #9F303B !important;
    border-color: #9F303B !important;
    color: #FFFFFF !important;
}

/* CAS My Images — Edit links */

a[href*="cas_edit="] {
    color: #72B9E7 !important;
}

a[href*="cas_edit="]:hover {
    color: #B4DFFF !important;
}

/* Delete image buttons */
form[action*="admin-post.php"] input[type="submit"],
form[action*="admin-post.php"] button[type="submit"] {
    color: #72B9E7 !important;
    border-color: #527E9D !important;
}

/* CAS Sky Diary — Astronomy-blue links */

/* All links within the Sky Diary archive */
body.page-id-12 main.site-main .page-content a {
    color: #72B9E7 !important;
}

/* Hover effect */
body.page-id-12 main.site-main .page-content a:hover {
    color: #B4DFFF !important;
}

/* Visited links */
body.page-id-12 main.site-main .page-content a:visited {
    color: #8BBDE0 !important;
}

/* CAS — Soft Starlight Gold content headings */

/* Standard page content headings */
body:not(.wp-admin) main.site-main
.page-content h2,
body:not(.wp-admin) main.site-main
.page-content h3,
body:not(.wp-admin) main.site-main
.entry-content h2,
body:not(.wp-admin) main.site-main
.entry-content h3 {
    color: #E6C47A !important;
}

/* Preserve main page titles */
body:not(.wp-admin) main.site-main
.page-header .entry-title {
    color: #FFFFFF !important;
}

/* Preserve gallery image titles */
body:not(.wp-admin) .cas-gallery-card-body h3,
body:not(.wp-admin) .cas-gallery-card-body h3 a {
    color: #E91E63 !important;
}

/* CAS Homepage — Smaller gold headings */

/* Main hero heading */
body.home .cas-hero h1 {
    font-size: clamp(36px, 4.2vw, 64px) !important;
}

/* Explore CAS heading */
body.home .cas-home h2 {
    font-size: clamp(30px, 3.5vw, 48px) !important;
}

/* CAS Homepage — Smaller Explore CAS heading */
body.home .cas-home h2 {
    font-size: clamp(24px, 2.5vw, 36px) !important;
    line-height: 1.2 !important;
}

/* CAS Meetings — Astronomy-blue meeting titles */

body.page-id-9 .caswf-meetings
.caswf-meeting-list a {
    color: #72B9E7 !important;
}

body.page-id-9 .caswf-meetings
.caswf-meeting-list a:hover {
    color: #B4DFFF !important;
}