html { scroll-behavior: smooth; }
body.admin-bar .site-header { top: 32px; }
.cgs-page-main { min-height: 55vh; }
.cgs-page-content { margin: 0; }
.cgs-page-content > .service-main { margin-inline: auto; }
.cgs-service-content { min-width: 0; }
.cgs-service-content > .service-main { width: 100%; margin-inline: 0; }
.cgs-service-rail .rail-group h3 a { color: inherit; text-decoration: none; }
.cgs-service-rail .rail-group h3 a:hover,
.cgs-service-rail .rail-group h3 a:focus-visible { color: #f9423a; }
.cgs-service-rail .rail-group.is-current-group h3 { color: #334d58; }
.cgs-service-rail .rail-group a[aria-current="page"] { color: #f9423a; }
.sg-media--placeholder.cgs-acf-media:has(> img) {
  border: 0;
  align-items: flex-end;
  justify-content: flex-start;
  background: var(--color-grey-200);
  color: var(--color-white);
}
.sg-media--placeholder.cgs-acf-media:has(> img)::after { display: none; }
.sg-media--placeholder.cgs-acf-media:has(> img) > span { display: none; }
.process-editorial__media--placeholder.cgs-acf-media:has(> img) { background: var(--color-grey-100); }
.cgs-page-content img,
.cgs-page-main img { display: block; max-width: 100%; }
.cgs-page-content [class*="media"],
.cgs-page-content [class*="image"] { overflow: hidden; }
.cgs-page-content [class*="media"] > img,
.cgs-page-content [class*="image"] > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sg-media--placeholder:not(:has(> img)),
.process-editorial__media--placeholder:not(:has(> img)),
.site-case-placeholder { background: #edf1f3 !important; color: #33424c !important; }
.cgs-form-status { margin-top: 1rem; padding: .8rem 1rem; border-left: 4px solid #d8a72a; background: #f7f3e8; }

.cgs-collection-page { min-height: 60vh; background: #f5f6f6; padding-bottom: 88px; }
.cgs-collection-hero { min-height: 300px; display: grid; place-items: center; padding: 72px 24px; color: #fff; background: linear-gradient(120deg,#0f242c,#183a45); text-align: center; }
.cgs-collection-hero h1 { margin: .5rem 0 0; color: inherit; font-size: clamp(2.2rem,5vw,4.6rem); }
.cgs-collection-hero .archive-description { max-width: 760px; margin: 1rem auto 0; }
.cgs-archive-grid { width: min(1180px, calc(100% - 40px)); margin: -48px auto 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; position: relative; }
.cgs-archive-card { background: #fff; box-shadow: 0 14px 34px rgba(15,36,44,.1); min-width: 0; }
.cgs-archive-card__media { display: block; aspect-ratio: 4/3; overflow: hidden; background: #dfe5e7; }
.cgs-archive-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cgs-archive-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#d7dee1,#eef1f2); }
.cgs-archive-card__body { padding: 26px; }
.cgs-archive-card__body h2 { margin: 0 0 12px; font-size: 1.35rem; }
.cgs-archive-card__body h2 a { color: inherit; text-decoration: none; }
.cgs-card-link { display: inline-block; margin-top: 12px; color: #0f6774; font-weight: 700; text-decoration: none; }
.navigation.pagination { width: min(1180px, calc(100% - 40px)); margin: 42px auto 0; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { padding: 10px 14px; background: #fff; color: #17343d; text-decoration: none; }
.page-numbers.current { background: #17343d; color: #fff; }
.cgs-empty { grid-column: 1/-1; background: #fff; padding: 32px; }
.cgs-error-page { min-height: 65vh; display: grid; place-content: center; justify-items: start; gap: 16px; width: min(760px,calc(100% - 40px)); margin: auto; }
.cgs-error-page h1,.cgs-error-page p { margin: 0; }
.mobile-nav .menu-item { list-style: none; }
.primary-nav .mega-menu h3 a { color: inherit; text-decoration: none; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 52px; width: auto; }

@media (max-width: 1024px) {
  .cgs-archive-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
@media (max-width: 700px) {
  .cgs-collection-hero { min-height: 240px; padding: 56px 20px; }
  .cgs-archive-grid { width: min(100% - 28px,560px); grid-template-columns: 1fr; gap: 20px; margin-top: -30px; }
  .cgs-archive-card__body { padding: 22px; }
  .silk-table-wrap, .modular-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Related entries stay within the current technical section. */
.cgs-service-rail .cgs-related-links--legacy { border-top: 1px solid #dce3e7; padding-top: 19px; margin: 0 0 26px; }
.cgs-service-rail .cgs-related-links__heading,
.cgs-related-mobile-legacy .cgs-related-links__heading { display: block; margin-bottom: 9px; color: #758d97; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.cgs-service-rail .cgs-related-links ul,
.cgs-related-mobile-legacy .cgs-related-links ul { list-style: none; margin: 0; padding: 0; }
.cgs-service-rail .cgs-related-links a,
.cgs-related-mobile-legacy .cgs-related-links a { display: block; padding: 6px 0; color: #353f45; font-size: 15px; line-height: 1.5; text-decoration: none; }
.cgs-service-rail .cgs-related-links a:hover,
.cgs-related-mobile-legacy .cgs-related-links a:hover { color: #f9423a; }
.cgs-related-mobile-legacy { display: none; }
@media (max-width: 820px) {
  .cgs-related-mobile-legacy { display: block; margin-top: 44px; padding: 20px 24px; background: #f4f6f7; border-radius: 10px; }
  .cgs-related-mobile-legacy .cgs-related-links ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 24px; }
}
@media (max-width: 520px) {
  .cgs-related-mobile-legacy .cgs-related-links ul { grid-template-columns: 1fr; }
}

/* Header and column menus follow the supplied dark-header and four-column references. */
.site-header{position:relative;background:#010d3c;color:#fff;}
.site-header__inner{width:min(calc(100% - 56px),1480px);gap:34px;}
.site-header .brand--wordmark,.site-header .nav-button,.site-header .header-contact,.site-header .language{color:#fff;}
.site-header .brand--wordmark{font-size:16px;letter-spacing:0;}
.site-header .brand{width:auto;}
.site-header .primary-nav{gap:20px;}
.site-header .nav-button{font-size:14px;}
.site-header .nav-button:hover,.site-header .nav-button:focus-visible,.site-header .nav-item.is-open .nav-button{color:#ff514b;}
.site-header .header-meta{gap:18px;}
.site-header .header-contact{font-size:12px;}
.site-header .button--small{min-height:32px;padding:6px 19px;font-size:12px;}
.site-header .language{font-size:13px;}
.site-header .mega-menu{top:100%;left:0;width:max-content;min-width:640px;max-width:min(1120px,calc(100vw - 56px));padding:24px 26px 18px;border:0;border-radius:0 0 12px 12px;box-shadow:0 18px 38px rgb(0 13 60 / 24%);transform:translateY(8px);}
.site-header .nav-item:hover .mega-menu,.site-header .nav-item:focus-within .mega-menu,.site-header .nav-item.is-open .mega-menu{transform:none;}
.site-header .mega-menu__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px;}
.site-header .mega-menu__column{min-width:0;}
.site-header .mega-menu h3{color:#76909d;font-size:11px;letter-spacing:.055em;margin:0 0 10px;}
.site-header .mega-menu a{color:#27343e;font-size:13px;line-height:1.45;padding:5px 0;text-decoration:none;white-space:normal;}
.site-header .mega-menu a:hover,.site-header .mega-menu a:focus-visible{color:#f6423a;text-decoration:underline;text-underline-offset:3px;}
.site-header .mega-menu__all{font-size:12px;color:#f6423a!important;padding-top:12px!important;margin-top:14px;}
.site-header .mega-menu--processes{left:-175px;width:min(940px,calc(100vw - 56px));}
.site-header .mega-menu--glass_products{left:-310px;width:min(840px,calc(100vw - 56px));}
.site-header .mega-menu--glass_products .mega-menu__grid{grid-template-columns:repeat(3,minmax(0,1fr));}
.site-header .mega-menu--industries,.site-header .mega-menu--materials{min-width:0;width:500px;}
.site-header .mega-menu--industries .mega-menu__grid,.site-header .mega-menu--materials .mega-menu__grid{grid-template-columns:repeat(2,minmax(0,1fr));}
.site-header .mega-menu--compact{left:auto;right:0;width:240px;min-width:0;}
.site-header .mega-menu--compact .mega-menu__grid{grid-template-columns:1fr;}
@media(max-width:1180px){.site-header__inner{gap:20px}.site-header .primary-nav{gap:12px}.site-header .header-contact{display:none}}
@media(max-width:1020px){.site-header .primary-nav,.site-header .header-meta{display:none}.site-header .menu-toggle{display:block}}
@media(max-width:820px){.site-header{position:sticky;top:0;background:#010d3c;box-shadow:0 8px 20px rgb(1 13 60 / 15%)}.site-header__inner{width:calc(100% - 32px)}.site-header .brand--wordmark{font-size:12px}.mobile-nav{background:#010d3c}}

/* Editorial links remain distinct from navigation, cards and buttons. */
.cgs-page-main :is(.rb-prose,.rb-source-content,.rb-service-rich,.fh-section p,.fh-case-grid) a:not(.button):not(.rb-button):not(.fh-btn):not(.fh-project-card),
.cgs-page-content :is(.rb-prose,.rb-source-content,.rb-service-rich) a:not(.button):not(.rb-button){color:#f6423a;text-decoration:underline;text-decoration-color:#f6423a;text-underline-offset:3px;text-decoration-thickness:1.5px;}
.cgs-page-main :is(.rb-prose,.rb-source-content,.rb-service-rich,.fh-section p,.fh-case-grid) a:not(.button):not(.rb-button):not(.fh-btn):not(.fh-project-card):hover,
.cgs-page-content :is(.rb-prose,.rb-source-content,.rb-service-rich) a:not(.button):not(.rb-button):hover{color:#cb2c26;text-decoration-thickness:2px;}

/* Keep the Contact Form 7 enquiry compact after its details panel opens. */
.cgs-drawing-engine__details .cnc-contact-form{padding:6px 0 0;}
.cgs-drawing-engine__details .cnc-contact-form h3{font-size:18px;margin:0 0 12px;}
.cgs-drawing-engine__details .cnc-form-grid>p{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin:0;}
.cgs-drawing-engine__details .cnc-form-grid>p>br{display:none;}
.cgs-drawing-engine__details .cnc-form-grid label{display:block;min-width:0;margin:0;}
.cgs-drawing-engine__details .cnc-form-grid label>span:first-child{display:block;margin:0 0 4px;font-size:11px;font-weight:700;}
.cgs-drawing-engine__details .cnc-form-grid input:not([type=file]),.cgs-drawing-engine__details .cnc-form-grid textarea{display:block;width:100%;max-width:none;min-height:36px;padding:7px 9px;border:1px solid #cdd5dd;border-radius:5px;font-size:13px;}
.cgs-drawing-engine__details .cnc-form-grid textarea{min-height:76px;height:76px;resize:vertical;}
.cgs-drawing-engine__details .cnc-form-grid .cnc-form-full,.cgs-drawing-engine__details .cnc-form-grid .cnc-form-file{grid-column:1/-1;}
.cgs-drawing-engine__details .cnc-form-grid .cnc-form-file input{width:100%;font-size:12px;}
.cgs-drawing-engine__details .wpcf7-submit{width:100%;min-height:40px;margin-top:12px;}
@media(max-width:480px){.cgs-drawing-engine__details .cnc-form-grid>p{grid-template-columns:1fr}.cgs-drawing-engine__details .cnc-form-grid .cnc-form-full,.cgs-drawing-engine__details .cnc-form-grid .cnc-form-file{grid-column:auto}}

/* Homepage collections use the original card proportions with live WordPress records. */
.cgs-home-products .fh-project-card,.cgs-home-blog .fh-project-card{background:#010d3c;}
.cgs-home-industries .fh-industry-grid .cgs-industry-card{display:flex;align-items:center;gap:24px;min-height:150px;padding:30px;background:#fff;color:#222d36;text-decoration:none;transition:background .2s,color .2s,transform .2s;}
.cgs-home-industries .fh-industry-grid .cgs-industry-card:hover,.cgs-home-industries .fh-industry-grid .cgs-industry-card:focus-visible{background:#010d3c;color:#fff;transform:translateY(-3px);}
.cgs-home-industries .cgs-industry-card img{display:block;width:64px;height:64px;object-fit:contain;flex:0 0 auto;}
.cgs-home-industries .cgs-industry-card:hover img,.cgs-home-industries .cgs-industry-card:focus-visible img{filter:brightness(0) invert(1);}
.cgs-home-industries .cgs-industry-card strong{display:block;margin:0 0 8px;font-size:20px;line-height:1.35;}
.cgs-home-industries .cgs-industry-card small{display:block;color:#59656d;font-size:14px;line-height:1.5;}
.cgs-home-industries .cgs-industry-card:hover small,.cgs-home-industries .cgs-industry-card:focus-visible small{color:#fff;}
.fh-case-grid a{color:#f6423a;text-decoration:underline;text-decoration-color:#f6423a;text-underline-offset:3px;}
@media(max-width:800px){.cgs-home-industries .fh-industry-grid{grid-template-columns:1fr}.cgs-home-industries .fh-industry-grid .cgs-industry-card{min-height:120px;padding:22px;}}

/* The last desktop dropdown stays inside the 1024px viewport. */
@media(min-width:1021px) and (max-width:1100px){.site-header .mega-menu--materials{left:auto;right:0;}}

/* CF7 places all eight labels inside one wrapper; let that wrapper span the card. */
.cgs-drawing-engine__details .cnc-form-grid{display:block;}
.cgs-drawing-engine__details .cnc-form-grid>p{width:100%;}

/* The drawing chooser above already supplies the CF7 attachment. */
.cgs-drawing-engine__details .cnc-contact-form h3{display:none;}
.cgs-drawing-engine__details .cnc-form-grid>p{gap:8px 12px;}
.cgs-drawing-engine__details .cnc-form-grid textarea{min-height:64px;height:64px;}
.cgs-drawing-engine__details .cnc-form-file{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.cgs-drawing-engine__details .wpcf7-submit{margin-top:6px;}

/* Keep page-content text links consistent across the V3 industry layout too. */
.cgs-page-main .cgs-v3-content .rb-industry-sticky-toc__row a,
.cgs-page-main a.rb-industry-process,
.cgs-page-main a.cgs-contact-email{color:#f6423a;text-decoration:underline;text-decoration-color:#f6423a;text-decoration-thickness:1.5px;text-underline-offset:3px;}
.cgs-page-main .cgs-v3-content .rb-industry-sticky-toc__row a:hover,
.cgs-page-main a.rb-industry-process:hover,
.cgs-page-main a.cgs-contact-email:hover{color:#cb2c26;text-decoration-thickness:2px;}
