/* CN Management Consultants: hand-written additions to the generated cn.css
   (things the page builder used to do with its own scripts). */

/* Pro gallery grid (laid out by script before) */
.cn-gallery__container{display:grid;grid-template-columns:repeat(var(--cn-cols,3),minmax(0,1fr));gap:var(--cn-gap,10px)}
.cn-gallery__container .e-gallery-item{position:relative;display:block;overflow:hidden}
.cn-gallery__container .e-gallery-image{padding-bottom:var(--cn-ratio,66.667%);background-size:cover;background-position:center center;background-repeat:no-repeat}
.cn-gallery__container .cn-gallery-item__overlay{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s ease}
.cn-gallery__container .e-gallery-item:hover .cn-gallery-item__overlay,.cn-gallery__container .e-gallery-item:focus-visible .cn-gallery-item__overlay{opacity:1}

/* Desktop dropdowns are opened by script; keep them above the page */
.cn-nav-menu--main .cn-nav-menu ul{z-index:9999}

/* Accordion: closed until clicked, as before */
.cn-accordion .cn-tab-content{display:none}
.cn-accordion .cn-tab-content.cn-active{display:block}

/* Form spam trap and sending state */
.cn-hp{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important}
.cn-form-waiting{opacity:.6}
.cn-form .cn-message{width:100%;margin:10px 0;font-size:1em;line-height:1}

/* Picture viewer */
.cn-lb{position:fixed;top:0;right:0;bottom:0;left:0;z-index:99999;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.87);user-select:none}
.cn-lb.cn-lb-open{display:flex}
.cn-lb-fig{margin:0;max-width:calc(100vw - 140px);max-height:calc(100vh - 100px);text-align:center}
.cn-lb-fig img{display:block;max-width:100%;max-height:calc(100vh - 140px);width:auto;height:auto;margin:0 auto;box-shadow:0 0 30px rgba(0,0,0,.3),0 0 8px -5px rgba(0,0,0,.3)}
.cn-lb-fig figcaption{color:#fff;font-size:14px;padding-top:10px;min-height:1em}
.cn-lb button{position:absolute;background:none;border:0;padding:15px;color:rgba(255,255,255,.9);font-size:25px;line-height:1;cursor:pointer}
.cn-lb button:hover,.cn-lb button:focus-visible{color:#fff;background:none}
.cn-lb-close{top:0;right:0}
.cn-lb-prev{left:0;top:50%;transform:translateY(-50%)}
.cn-lb-next{right:0;top:50%;transform:translateY(-50%)}
.cn-lb-count{position:absolute;top:0;left:0;padding:15px;color:#fff;font-size:14px}
@media (max-width:767px){.cn-lb-fig{max-width:100vw}.cn-lb-prev,.cn-lb-next{top:auto;bottom:0;transform:none}}

/* YOLO Canvas: the page fills the window edge to edge, as it did in Astra's page-builder layout
   (no theme gaps between header, content and footer, no content width or side padding). */
.cn-canvas .wp-site-blocks{padding:0!important}
.cn-canvas .wp-site-blocks>*{margin-block-start:0!important;margin-block-end:0!important}
.cn-canvas main.wp-block-group,.cn-canvas .wp-block-post-content{padding:0!important;margin:0!important;max-width:none!important}
.cn-canvas .wp-block-post-content>.cn-wrap{max-width:none!important;margin:0!important;width:auto}

/* YOLO Builder edit mode: carousels stop and show every slide, one under another, so each can be edited.
   (The looping copies of slides are hidden; they carry no edit marks.) */
.yolob-editing :is(.cn-widget-testimonial-carousel,.cn-widget-image-carousel) .swiper-wrapper{display:block!important;transform:none!important;height:auto!important}
.yolob-editing :is(.cn-widget-testimonial-carousel,.cn-widget-image-carousel) .swiper-slide{width:auto!important;height:auto!important;margin:0 0 30px!important;opacity:1!important}
.yolob-editing :is(.cn-widget-testimonial-carousel,.cn-widget-image-carousel) .swiper-slide-duplicate{display:none!important}
.yolob-editing .cn-widget-testimonial-carousel .swiper-pagination,.yolob-editing .cn-widget-testimonial-carousel .cn-swiper-button{display:none!important}

/* Carousels: their columns may shrink below the slides' set widths (margins on the column),
   as the page builder's own slider allowed. */
.cn-widget-wrap:has(> .cn-widget-testimonial-carousel,> .cn-widget-image-carousel,> .cn-widget-slides){min-width:0}
