﻿/*
Theme Name: Rayshine Group Homepage Artwork Carousel
Theme URI: https://rayshinegroup.com/
Author: Rayshine Group
Description: Reusable Rayshine design shell with WordPress and Elementor editable content.
Version: 30.1.0
Text Domain: rayshine-editor
*/
:root {
  --navy: #04101f;
  --navy-2: #071a31;
  --blue: #173f77;
  --orange: #f27438;
  --text: #07172b;
  --muted: #777;
  --light: #ededed;
  --line: #d8d8d8;
  --footer: #191919;
  --content: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 14px;
}

/* WordPress editor content. These classes are available to Gutenberg and Elementor. */
.rayshine-content { min-height: 56vh; padding: 56px 0 80px; }
.rayshine-content .entry-title { margin: 0 0 28px; font-size: clamp(30px, 4vw, 46px); color: var(--blue); }
.rayshine-content .wp-block-image img, .rayshine-product-card img { max-width: 100%; height: auto; }
.rayshine-content .wp-block-group { margin-block: 0 34px; }
.rayshine-content .wp-block-heading { color: var(--blue); }
.rayshine-content .wp-block-table table { border-collapse: collapse; width: 100%; }
.rayshine-content .wp-block-table td, .rayshine-content .wp-block-table th { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.rayshine-content .wp-block-table th { background: #f4f6f8; }
.rayshine-product-archive { padding: 56px 0 80px; min-height: 56vh; }
.rayshine-category { margin: 0 0 50px; }
.rayshine-category-title { color: var(--blue); border-bottom: 2px solid var(--orange); padding-bottom: 10px; }
.rayshine-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.rayshine-product-card { display: block; border: 1px solid #e2e5e8; color: inherit; text-decoration: none; padding: 18px; background: #fff; transition: box-shadow .2s ease, transform .2s ease; }
.rayshine-product-card:hover { box-shadow: 0 10px 28px rgba(4,16,31,.14); transform: translateY(-2px); }
.rayshine-product-card h3 { margin: 12px 0 0; font-size: 17px; color: var(--blue); }
.rayshine-product-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.rayshine-product-single { padding: 56px 0 80px; min-height: 56vh; }
.rayshine-product-single .product-title { color: var(--blue); font-size: clamp(30px,4vw,46px); }
.rayshine-product-meta { color: var(--muted); margin-bottom: 26px; }

/* News archive */
.news-main { padding: 58px 0 92px; min-height: 680px; }
.news-header { margin-bottom: 46px; }
.news-list { max-width: 820px; }
.news-card { margin: 0 0 30px; padding: 0 0 30px; border-bottom: 1px solid var(--line); }
.news-card:last-child { margin-bottom: 0; }
.news-card .entry-title { margin: 0 0 9px; color: #111; font-size: 22px; line-height: 1.25; font-weight: 600; }
.news-card .entry-title a { color: inherit; transition: color .18s ease; }
.news-card .entry-title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.news-card .entry-title a:hover { color: #111; }
.news-meta { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.news-card .entry-content { color: #26384d; font-size: 15px; line-height: 1.7; }
.news-card .entry-content p { margin: 0; }
.news-empty { color: var(--muted); font-size: 15px; }
.news-single-main { padding: 58px 0 92px; min-height: 680px; }
.news-article { max-width: 820px; }
.news-article-header { margin-bottom: 34px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.news-article-title { margin: 0 0 12px; color: #111; font-size: clamp(28px, 3vw, 38px); line-height: 1.2; font-weight: 600; }
.news-article-content { color: var(--text); font-size: 15px; line-height: 1.8; }
.news-article-content .wp-block-heading { color: var(--text); }
.news-article-content p { margin: 0 0 18px; }
.news-article-content img { height: auto; }

.rayshine-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 24px; }
.rayshine-menu a { color: inherit; text-decoration: none; font-weight: 700; letter-spacing: .03em; }
.footer-nav .rayshine-menu { display: flex; flex-wrap: nowrap; gap: 12px; white-space: nowrap; }
@media (max-width: 760px) { .rayshine-menu { display: block; } .rayshine-menu li { padding: 10px 0; } }
@media (max-width: 760px) { .rayshine-product-grid { grid-template-columns: 1fr; } .rayshine-content, .rayshine-product-archive, .rayshine-product-single { padding: 36px 0 56px; } }
@media (max-width: 760px) { .news-main, .news-single-main { padding: 44px 0 64px; } .news-header { margin-bottom: 34px; } .news-card { margin-bottom: 24px; padding-bottom: 24px; } .news-card .entry-title { font-size: 20px; } .news-article-title { font-size: 28px; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
.container { width: min(var(--content), calc(100% - 40px)); margin-inline: auto; }

/* Header */
.site-header {
  height: 100px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 30;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}
.logo { width: 154px; flex: 0 0 auto; }
.logo img { width: 100%; height: auto; }
.main-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-item { position: relative; }
.nav-link {
  display: block;
  padding: 13px 0 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width .2s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 18px; }
.nav-caret { font-size: 9px; margin-left: 4px; opacity: .8; }
.dropdown {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 190px;
  padding: 8px 0;
  background: #fff;
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .18s ease;
}
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 10px 18px; font-size: 12px; }
.dropdown a:hover { background: #f2f2f2; color: var(--orange); }
.contact-btn {
  margin-left: 26px;
  padding: 11px 24px;
  border-radius: 2px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
}
.contact-btn:hover { filter: brightness(.95); }
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  cursor: pointer;
}

/* Shared headings */
.section-title,
.page-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.4px;
  text-transform: uppercase;
}
.section-title::before,
.page-title::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 28px;
  margin-right: 17px;
  vertical-align: -2px;
  background: var(--orange);
}
.center-title { text-align: center; color: #fff; }
.center-title::before { display: none; }
.center-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: var(--orange);
  margin: 15px auto 0;
}

/* Home hero */
.hero {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,16,31,1) 0%, rgba(4,16,31,.98) 24%, rgba(4,16,31,.6) 48%, rgba(4,16,31,.05) 78%),
    url('./hero-machinery.webp') right center / auto 100% no-repeat;
  transform: scale(1.02);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: rgba(255,255,255,.06);
}
.hero-inner { position: relative; min-height: 470px; display: flex; align-items: center; }
.hero-copy { width: 430px; padding-bottom: 8px; }
.hero-kicker {
  margin: 0 0 17px;
  color: var(--orange);
  font-size: 29px;
  line-height: 1.05;
  font-weight: 700;
  font-style: italic;
}
.hero-copy p {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.42;
  font-weight: 700;
  max-width: 390px;
}
.outline-button {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 11px 17px;
  border: 2px solid var(--orange);
  border-radius: 25px;
  font-size: 12px;
  color: #fff;
}
.outline-button:hover { background: var(--orange); }
.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: rgba(4,16,31,.2);
  color: #fff;
  cursor: pointer;
}
.hero-arrow.prev { left: 30px; }
.hero-arrow.next { right: 30px; }

/* Home profile */
.home-profile { background: #efefef; padding: 105px 0 102px; }
.profile-showcase {
  width: 800px;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.12fr 1.52fr;
  gap: 8px;
}
.profile-panel { min-height: 292px; overflow: hidden; background: var(--navy); }
.profile-panel img { width: 100%; height: 100%; object-fit: cover; }

/* Home products */
.home-products { background: var(--navy); padding: 65px 0 105px; }
.product-showcase { width: 800px; max-width: 100%; margin: 36px auto 0; }
.product-lineup {
  height: 230px;
  background: linear-gradient(#91a9c5, #f2f5f8);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
}
.product-lineup img { width: 100%; height: 100%; object-fit: cover; }
.home-product-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  margin-top: 7px;
}
.home-product-card {
  min-height: 170px;
  background: linear-gradient(#d9e3ee, #f6f7f8);
  padding: 17px 10px 12px;
  text-align: center;
  grid-column: span 3;
  transition: transform .2s ease;
}
.home-product-card:nth-child(n+5) { grid-column: span 12; }
.home-product-row-2 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  grid-column: 1 / -1;
}
.home-product-card:hover { transform: translateY(-3px); }
.home-product-card h3 {
  min-height: 28px;
  margin: 0;
  color: var(--text);
  font-size: 10px;
  line-height: 1.15;
  text-transform: uppercase;
}
.home-product-card img { width: 100%; height: 112px; object-fit: contain; margin-top: 6px; }

/* Applications */
.application-area { background: #89929c; color: #fff; padding: 43px 0 42px; }
.application-grid {
  margin-top: 35px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
  text-align: center;
}
.application-item { font-size: 8px; line-height: 1.25; text-transform: uppercase; }
.app-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.app-icon svg { width: 27px; height: 27px; stroke: #fff; fill: none; stroke-width: 1.8; }
.app-icon img { width: 27px; height: 27px; object-fit: contain; }

/* Gutenberg homepage blocks: retain the original static-layout geometry. */
.home-products > .wp-block-group__inner-container,
.home-products > .wp-block-group,
.home-products .product-showcase,
.home-products .home-product-grid { width: 800px !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
.home-products .product-showcase { position: relative; padding-top: 237px; margin-top: 36px !important; }
.home-products .product-showcase::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 230px; background: linear-gradient(#91a9c5, #f2f5f8) url('./product-lineup-hd.webp') center / cover no-repeat; border: 1px solid rgba(255,255,255,.2); }
.home-products .home-product-grid { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)) !important; gap: 6px !important; margin-top: 0 !important; }
.home-products .home-product-grid > .wp-block-group__inner-container { display: contents !important; }
.home-products .home-product-grid > .wp-block-group.home-product-card { display: block !important; min-width: 0; grid-column: span 3 !important; }
.home-products .home-product-grid > .home-product-row-2 { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 6px !important; grid-column: 1 / -1 !important; }
.home-products .home-product-row-2 > .wp-block-group__inner-container { display: contents !important; }
.home-products .home-product-row-2 > .wp-block-group.home-product-card { display: block !important; min-width: 0; }
.home-products .home-product-card { min-height: 170px !important; padding: 17px 10px 12px !important; background: linear-gradient(#d9e3ee, #f6f7f8) !important; text-align: center !important; }
.home-products .home-product-card h3 { min-height: 28px; margin: 0 !important; color: var(--text) !important; font-size: 10px !important; line-height: 1.15 !important; }
.home-products .home-product-card .wp-block-image { margin: 6px 0 0 !important; }
.home-products .home-product-card .wp-block-image img { display: block; width: 100% !important; height: 112px !important; object-fit: contain !important; }

.application-area > .wp-block-group__inner-container,
.application-area > .wp-block-group,
.application-area .application-grid { width: 800px !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
.application-area .application-grid { display: grid !important; grid-template-columns: repeat(8, minmax(0, 1fr)) !important; gap: 18px !important; margin-top: 35px !important; text-align: center !important; }
.application-area .application-grid > .wp-block-group__inner-container { display: contents !important; }
.application-area .application-item { display: block !important; min-width: 0; font-size: 8px !important; line-height: 1.25 !important; text-transform: uppercase !important; }
.application-area .application-item::before { content: ""; display: block; width: 48px; height: 48px; margin: 0 auto 9px; border: 2px solid #fff; border-radius: 50%; box-sizing: border-box; }
.application-area .application-item .wp-block-image { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 9px !important; border: 2px solid #fff; border-radius: 50%; }
.application-area .application-item .wp-block-image + p { margin-top: 0 !important; }
.application-area .application-item .wp-block-image img { width: 27px !important; height: 27px !important; object-fit: contain; }
.application-area .application-item:has(.wp-block-image)::before { display: none; }
.application-area .application-item p { margin: 0 !important; }

/* Contact Form 7 inside the native Gutenberg block. */
.home-contact > .wp-block-group__inner-container,
.home-contact > .wp-block-group { width: 800px !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
.home-contact .wpcf7 { margin-top: 38px; }
.home-contact .wpcf7-form { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important; }
.home-contact .wpcf7-form > p { display: flex; flex-direction: column; gap: 8px; margin: 0 !important; color: var(--text); font-size: 12px; }
.home-contact .wpcf7-form-control-wrap { display: block; }
.home-contact .wpcf7 input:not([type="submit"]),
.home-contact .wpcf7 textarea { width: 100% !important; border: 0 !important; border-bottom: 1px solid #bfc4ca !important; border-radius: 0 !important; padding: 8px 0 !important; background: transparent !important; box-sizing: border-box; }
.home-contact .wpcf7 textarea { min-height: 118px; resize: vertical; }
.home-contact .wpcf7-form > p:has(textarea) { grid-column: 1 / -1; }
.home-contact .wpcf7-form > p:has(input[type="submit"]) { grid-column: 1 / -1; align-items: flex-start; }
.home-contact .wpcf7 input[type="submit"] { min-width: 120px; padding: 11px 26px; border: 0; color: #fff; background: var(--orange); font-weight: 700; cursor: pointer; }
.home-contact .wpcf7-response-output { grid-column: 1 / -1; margin: 0 !important; border: 0 !important; padding: 0 !important; }

/* Contact Form 7 wraps the supplied HTML in paragraph tags. Keep those wrappers vertical. */
.home-contact .wpcf7-form { display: block !important; }
.home-contact .wpcf7-form > p { display: block !important; margin: 0 0 20px !important; }
.home-contact .wpcf7-form .form-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
.home-contact .wpcf7-form .message-wrap { display: block !important; margin-top: 20px !important; }
.home-contact .wpcf7-form .message-wrap textarea { display: block; width: 100% !important; min-height: 162px !important; border: 0 !important; background: #eee !important; padding: 12px !important; box-sizing: border-box; }
.home-contact .wpcf7-form .field-line { display: grid !important; grid-template-columns: auto 1fr !important; gap: 8px !important; align-items: stretch !important; }
.home-contact .wpcf7-form .field-label { display: flex; align-items: center; padding: 0 14px; color: #fff; background: var(--orange); white-space: nowrap; }
.home-contact .wpcf7-form .field-control { min-width: 0; height: 46px; border: 0 !important; background: #eee !important; padding: 8px 10px !important; }

/* The front-page template uses the original static DOM, without Gutenberg wrappers. */
.home-products .product-showcase:not(.wp-block-group) { padding-top: 0 !important; margin-top: 36px !important; }
.home-products .product-showcase:not(.wp-block-group)::before { content: none !important; }
.application-area .application-item:not(.wp-block-group)::before { display: none !important; }

/* Contact block */
.home-contact { padding: 74px 0 74px; }
.home-contact .section-title { font-size: 32px; }
.home-contact .section-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin: 14px 0 0 0;
  background: var(--orange);
}
.home-contact .section-title::before { display: none; }

.contact-form { margin-top: 38px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field-line { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: stretch; }
.field-label {
  min-width: 112px;
  padding: 14px 13px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
}
.field-control {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: #ececec;
  padding: 11px 13px;
  color: var(--text);
}
.message-wrap { margin-top: 20px; }
.message-wrap textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 16px;
  background: #ececec;
  color: var(--orange);
}
.submit-button {
  margin-top: 14px;
  border: 0;
  background: var(--orange);
  color: #fff;
  padding: 7px 10px;
  font-size: 11px;
  cursor: pointer;
}
.form-note { display: none; margin-top: 12px; color: #237a3f; }
.form-note.show { display: block; }

/* Internal pages */
.inner-main { padding: 70px 0 85px; min-height: 800px; }
.about-main { padding-bottom: 70px; }
.about-hero-image { margin-top: 27px; width: 100%; height: 360px; object-fit: cover; }
.about-copy { margin-top: 34px; font-size: 12px; line-height: 1.42; color: #111; }
.about-copy p { margin: 0 0 18px; }
.history { margin-top: 65px; }
.history .page-title { margin-bottom: 32px; }
.timeline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 85px; position: relative; }
.timeline-column { position: relative; padding-left: 19px; }
.timeline-column::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 12px; width: 1px; background: #09203d; }
.timeline-item { position: relative; margin-bottom: 31px; }
.timeline-item::before { content: ""; position: absolute; left: -19px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #09203d; }
.timeline-year { margin: 0 0 6px; font-size: 18px; }
.timeline-item p { margin: 0; font-size: 10px; line-height: 1.25; max-width: 350px; }

/* Category page */
.category-main { padding: 85px 0 95px; min-height: 1110px; }
.category-main .category-page-title { margin-bottom: 42px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 12px;
}
.category-card {
  height: 260px;
  padding: 30px 18px 18px;
  background: #dedede;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0,0,0,.12); }
.category-card h2 { margin: 0; font-size: 15px; line-height: 1.2; text-transform: uppercase; }
.category-card img { width: 100%; height: 190px; object-fit: contain; margin-top: 5px; }

/* Product list */
.product-list-main { padding: 73px 0 80px;  }
.list-layout { display: grid; grid-template-columns: 260px 1fr; gap: 62px; }
.list-sidebar .page-title { font-size: 30px; margin-bottom: 20px; }
.list-sidebar .page-title::before { height: 28px; width: 6px; margin-right: 12px; }
.category-menu { list-style: none; padding: 0; margin: 0; }
.category-menu li { margin: 0 0 7px; }
.category-menu a {
  display: block;
  padding: 10px 11px;
  font-size: 14px;
  text-transform: uppercase;
}
.category-menu a::before { content: "\00bb"; margin-right: 7px; color: #777; }
.category-menu a.active { background: var(--navy); color: #fff; border-radius: 2px; }
.category-menu a.active::before { color: #fff; }
.series-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 60px; row-gap: 90px; }
.series-card { text-align: left; }
.series-card img { width: 100%; height: 150px; object-fit: contain; }
.series-card h3 { margin: 18px 0 0; font-size: 14px; font-weight: 400; }

/* Breadcrumb and product detail */
.detail-main { padding: 64px 0 90px; min-height: 1160px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding-left: 10px;
  border-left: 5px solid var(--orange);
  border-bottom: 1px solid var(--orange);
  font-size: 12px;
  text-transform: uppercase;
}
.breadcrumb strong { font-weight: 700; }
.detail-panel { margin-top: 20px; background: #f0f0f0; padding: 42px 35px 35px; }
.product-intro { min-height: 275px; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.product-intro-image { display: flex; justify-content: center; align-items: flex-start; }
.product-intro-image img { width: 240px; height: 205px; object-fit: contain; }
.product-intro h1 { margin: 55px 0 0; font-family: Georgia, 'Times New Roman', serif; color: #0c3264; font-size: 18px; line-height: 1.25; }
.richtext { margin-top: 10px; }
.richtext-title {
  margin: 0 0 8px;
  padding: 12px 10px;
  background: #1c4278;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.spec-table { width: 100%; border-collapse: collapse; color: #0d315f; font-size: 10px; }
.spec-table th,
.spec-table td { border: 1px solid #1c4278; padding: 8px 10px; text-align: left; vertical-align: middle; }
.spec-table th { background: #d3d9e0; font-weight: 400; }
.spec-table td:nth-child(1) { width: 39%; }
.spec-table td:nth-child(2) { width: 17%; }
.spec-table td:nth-child(3) { width: 44%; }
.encoder-lines { line-height: 1.45; white-space: pre-line; }

/* Legacy product tables pasted as Gutenberg blocks. */
.detail-main .richtext .wp-block-table.rayshine-spec-section { margin: 22px 0 10px; overflow: visible; }
.detail-main .richtext .wp-block-table.rayshine-spec-section table { width: 100%; border-collapse: collapse; color: #fff; }
.detail-main .richtext .wp-block-table.rayshine-spec-section td,
.detail-main .richtext .wp-block-table.rayshine-spec-section th { padding: 12px 10px; border: 1px solid #1c4278; background: #1c4278; color: #fff; font-weight: 700; }
.detail-main .richtext .wp-block-table.rayshine-spec-table { margin: 0; overflow: visible; }
.detail-main .richtext .wp-block-table.rayshine-spec-table table { width: 100%; border-collapse: collapse; color: #0d315f; font-size: 10px; }
.detail-main .richtext .wp-block-table.rayshine-spec-table td,
.detail-main .richtext .wp-block-table.rayshine-spec-table th { padding: 8px 10px; border: 1px solid #1c4278; color: #0d315f; text-align: left; vertical-align: middle; }
.detail-main .richtext .wp-block-table.rayshine-spec-table tr:first-child td,
.detail-main .richtext .wp-block-table.rayshine-spec-table tr:first-child th { background: #d3d9e0; font-weight: 400; }
.detail-main .richtext .wp-block-table.rayshine-spec-table td:nth-child(1) { width: 39%; }
.detail-main .richtext .wp-block-table.rayshine-spec-table td:nth-child(2) { width: 17%; }
.detail-main .richtext .wp-block-table.rayshine-spec-table td:nth-child(3) { width: 44%; }

/* Contact page */
.contact-main { padding: 70px 0 80px; min-height: 570px; }
.contact-main .contact-form { margin-top: 46px; }
.contact-main .page-title { font-size: 36px; }
.contact-main .field-label { min-width: 125px; font-size: 16px; padding: 14px 16px; }
.contact-main .field-control { min-height: 43px; }
.contact-main .message-wrap textarea { min-height: 165px; font-size: 14px; }
.contact-main .submit-button { font-size: 14px; padding: 5px 8px; }

/* Footer */
.site-footer { background: var(--footer); color: #f7f7f7; padding: 72px 0 62px; }
.footer-layout { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); column-gap: 110px; row-gap: 55px; }
.footer-brand { min-width: 0; }
.footer-nav { border-bottom: 1px solid #777; padding-bottom: 14px; }
.footer-nav .rayshine-menu { gap: 12px; }
.footer-nav a { font-size: 11px; font-weight: 400; }
.footer-search { display: flex; width: 274px; height: 48px; margin-top: 35px; }
.footer-search input { flex: 1; min-width: 0; border: 1px solid #aaa; border-right: 0; border-radius: 4px 0 0 4px; padding: 0 12px; color: #5f6072; background: #fff; font-size: 13px; }
.footer-search button { width: 54px; border: 1px solid #aaa; border-radius: 0 4px 4px 0; background: #f7f7f7; color: #6d6d80; cursor: pointer; }
.footer-search svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.footer-office { min-width: 0; }
.footer-office h3 { margin: 0 0 18px; color: #fff; font-size: 11px; line-height: 1.35; text-transform: uppercase; }
.footer-office p { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; color: #efefef; font-size: 9px; line-height: 1.4; }
.footer-office a { text-decoration: none; }
.footer-contact-icon { flex: 0 0 16px; width: 16px; height: 16px; margin-top: -2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.find-us { margin: -3px 0 0; }
.find-us h3 { margin: 0 0 21px; font-size: 14px; text-transform: uppercase; }
.socials { display: flex; gap: 12px; }
.socials a { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 3px; background: #a6a6a6; color: #111; }
.socials svg { width: 34px; height: 34px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-copyright { display: flex; align-items: end; min-width: 0; }
.footer-line { width: 100%; border-bottom: 1px solid #777; }
.copyright { color: #9b9b9b; font-size: 10px; text-align: right; padding: 0 10px 15px 0; }

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .container { width: min(100% - 30px, var(--content)); }
  .site-header { height: 82px; }
  .logo { width: 138px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    padding: 12px 20px 20px;
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px 0; }
  .contact-btn { margin: 10px 0 0; text-align: center; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; background: #0b203a; color: #fff; }
  .nav-item:hover .dropdown { display: block; }
  .hero, .hero-inner { min-height: 450px; }
  .hero::before { background: linear-gradient(90deg, rgba(4,16,31,.98), rgba(4,16,31,.65)), url('./hero-machinery.webp') 65% center / auto 100% no-repeat; }
  .hero-arrow { display: none; }
  .hero-copy { width: 100%; }
  .profile-showcase { grid-template-columns: 1fr; }
  .profile-panel { min-height: 240px; }
  .application-grid { grid-template-columns: repeat(4, 1fr); row-gap: 26px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .category-main { min-height: 0; }
  .list-layout { grid-template-columns: 1fr; gap: 40px; }
  .category-menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .series-grid { column-gap: 30px; row-gap: 60px; }
  .footer-layout { grid-template-columns: 1fr; gap: 42px; }
  .footer-copyright { min-height: 44px; }
  .copyright { text-align: left; padding-left: 0; }
}

@media (max-width: 640px) {
  .section-title, .page-title { font-size: 27px; }
  .hero-kicker { font-size: 25px; }
  .hero-copy p { font-size: 16px; }
  .home-profile { padding: 60px 0; }
  .home-products { padding: 55px 0 70px; }
  .product-lineup { height: 165px; }
  .home-product-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
  .home-product-card, .home-product-card:nth-child(n+5) { grid-column: auto; }
  .home-product-row-2 { display: contents; }
  .home-product-card { min-height: 150px; }
  .application-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .field-line { grid-template-columns: 105px 1fr; }
  .contact-main .field-label { min-width: 105px; font-size: 13px; }
  .about-hero-image { height: 230px; }
  .timeline-grid { grid-template-columns: 1fr; gap: 0; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { height: 245px; }
  .category-menu { grid-template-columns: 1fr; }
  .series-grid { grid-template-columns: repeat(2, 1fr); column-gap: 20px; }
  .series-card img { height: 130px; }
  .product-intro { grid-template-columns: 1fr; min-height: 0; }
  .product-intro h1 { margin: 20px 0 32px; text-align: center; }
  .detail-panel { padding: 28px 18px 22px; }
  .spec-table { min-width: 650px; }
  .richtext { overflow-x: auto; }
  .site-footer { padding: 52px 0 42px; }
  .footer-nav .rayshine-menu { flex-wrap: wrap; gap: 12px 16px; white-space: normal; }
  .footer-nav a { font-size: 12px; }
  .footer-search { width: 100%; max-width: 300px; }
}

/* Final Contact Form 7 normalization: flatten CF7's automatic paragraph wrappers. */
.home-contact .container > .wpcf7 { width: 800px; max-width: 100%; margin: 38px auto 0; }
.home-contact .wpcf7-form .form-grid > p { display: contents !important; margin: 0 !important; }
.home-contact .wpcf7-form .form-grid .field-line { display: grid !important; grid-template-columns: 112px minmax(0, 1fr) !important; gap: 8px !important; margin: 0 !important; }
.home-contact .wpcf7-form .form-grid .field-label { grid-column: 1; width: auto !important; min-width: 112px !important; height: 46px; padding: 0 13px !important; }
.home-contact .wpcf7-form .form-grid .wpcf7-form-control-wrap { grid-column: 2; min-width: 0; }
.home-contact .wpcf7-form .form-grid input.field-control { display: block; width: 100% !important; height: 46px !important; border: 0 !important; outline: 0 !important; background: #ececec !important; padding: 11px 13px !important; }
.home-contact .wpcf7-form .message-wrap > p { display: contents !important; margin: 0 !important; }
.home-contact .wpcf7-form .message-wrap textarea.field-control { display: block; width: 100% !important; min-height: 162px !important; border: 0 !important; outline: 0 !important; background: #ececec !important; padding: 16px !important; color: var(--text) !important; }

/* CF7 field tags are inline wrappers; Flex prevents their grid auto-placement from splitting rows. */
.home-contact .container { width: 960px !important; max-width: calc(100% - 40px) !important; }
.home-contact .container .wpcf7 { width: 100% !important; max-width: none !important; }
.home-contact .wpcf7-form .form-grid .field-line { display: flex !important; align-items: stretch !important; gap: 8px !important; }
.home-contact .wpcf7-form .form-grid .field-label { flex: 0 0 112px; }
.home-contact .wpcf7-form .form-grid .wpcf7-form-control-wrap { flex: 1 1 auto; min-width: 0; }

@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .home-products { padding: 55px 0 70px; }
  .home-products .product-showcase { width: 100% !important; }
  .home-products .product-lineup { height: 150px; }
  .home-products .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px !important; }
  .home-products .home-product-grid > .home-product-card { grid-column: span 1 !important; }
  .home-products .home-product-grid > .home-product-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-column: 1 / -1 !important; }
  .home-products .home-product-row-2 > .home-product-card { grid-column: auto !important; }
  .home-products .home-product-card { min-height: 155px !important; padding: 12px 6px 8px !important; }
  .home-products .home-product-card h3 { font-size: 9px !important; }
  .home-products .home-product-card img { height: 100px !important; }

  .application-area { padding: 43px 0 42px; }
  .application-area .application-grid { width: 100% !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 26px 12px !important; }
  .application-area .application-item { font-size: 10px !important; }

  .home-contact { padding: 52px 0; }
  .home-contact .section-title { font-size: 30px; line-height: 1.1; }
  .home-contact .container { width: min(960px, calc(100% - 40px)) !important; }
  .home-contact .wpcf7-form .form-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .home-contact .wpcf7-form .form-grid .field-line { grid-template-columns: 105px minmax(0, 1fr) !important; }
  .home-contact .wpcf7-form .form-grid .field-label { flex-basis: 105px; min-width: 105px !important; font-size: 13px; }
  .home-contact .wpcf7-form .message-wrap textarea.field-control { min-height: 145px !important; }
}
/* Final desktop fidelity adjustments */
.home-product-row-2 .home-product-card { grid-column: auto !important; }
.hero-arrow.next { display: none; }
@media (min-width: 901px) {
  .hero::before {
    background:
      linear-gradient(90deg, rgba(4,16,31,1) 0%, rgba(4,16,31,1) 34%, rgba(4,16,31,.92) 48%, rgba(4,16,31,.25) 67%, rgba(4,16,31,.02) 83%),
      url('./hero-machinery.webp') right center / auto 100% no-repeat;
  }
}

/* Version 20: shared alignment, dropdown navigation, and manual profile carousel. */
.home-products > .wp-block-group__inner-container,
.home-products > .wp-block-group,
.home-products .product-showcase,
.home-products .home-product-grid,
.application-area > .wp-block-group__inner-container,
.application-area > .wp-block-group,
.application-area .application-grid {
  width: var(--content) !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.home-products .product-showcase::before { border: 0 !important; }

.application-area .application-grid { gap: 22px !important; }
.application-area .application-item { font-size: 11px !important; line-height: 1.3 !important; font-weight: 700; }
.application-area .application-item::before,
.application-area .application-item .wp-block-image {
  width: 64px !important;
  height: 64px !important;
  margin-bottom: 11px !important;
}
.application-area .application-item .wp-block-image img,
.application-area .app-icon svg,
.application-area .app-icon img { width: 34px !important; height: 34px !important; }

.site-menu { gap: 24px; }
.site-menu .nav-item { display: flex; align-items: center; }
.site-menu .nav-item-has-dropdown { position: relative; }
.site-menu .nav-link { position: relative; }
.nav-submenu-toggle {
  margin: 0 0 0 4px;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.nav-item.submenu-open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.site-menu .dropdown { max-height: min(70vh, 580px); overflow-y: auto; min-width: 230px; }
.site-menu .dropdown a { white-space: normal; }

.profile-history-carousel { position: relative; min-width: 0; padding: 0 38px; }
.profile-history-viewport {
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.profile-history-viewport::-webkit-scrollbar { display: none; }
.profile-history-cards { display: flex; gap: 8px; min-width: max-content; }
.profile-history-card { flex: 0 0 calc((100% - 8px) / 2); scroll-snap-align: start; }
.profile-carousel-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 30px;
  height: 46px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}
.profile-carousel-button.previous { left: 0; }
.profile-carousel-button.next { right: 0; }
.profile-carousel-button:hover { background: var(--orange); }
.profile-carousel-button:disabled { opacity: .35; cursor: default; }
.profile-carousel-button:disabled:hover { background: var(--navy); }

/* CSS previously stored in Appearance > Additional CSS. */
.product-list-main .series-grid .series-card,
.product-list-main .series-grid .series-card h3,
.rayshine-product-list .series-grid .series-card,
.rayshine-product-list .series-grid .series-card h3 { text-align: center !important; }
.product-list-main .series-grid .series-card h3,
.rayshine-product-list .series-grid .series-card h3 {
  display: block !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.detail-main .product-intro-image img {
  width: 300px !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

@media (max-width: 900px) {
  .main-nav .site-menu { display: block; width: 100%; }
  .site-menu .nav-item { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .site-menu .nav-link { flex: 1 1 auto; }
  .site-menu .dropdown { flex: 1 0 100%; width: 100%; max-height: none; }
  .site-menu .nav-item.submenu-open .dropdown { display: block; }
  .site-menu .nav-submenu-toggle { padding: 11px 8px; }
  .application-area .application-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .profile-history-carousel { padding: 0 36px; }
}

@media (max-width: 640px) {
  .detail-main .product-intro-image img { width: 260px !important; }
  .application-area .application-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .application-area .application-item { font-size: 12px !important; }
  .profile-history-card { flex-basis: 100%; }
}
@media (min-width: 901px) {
  .hero::before {
    background:
      linear-gradient(90deg, rgba(4,16,31,1) 0%, rgba(4,16,31,1) 50%, rgba(4,16,31,.78) 60%, rgba(4,16,31,.18) 75%, rgba(4,16,31,.02) 88%),
      url('./hero-machinery.webp') right center / auto 100% no-repeat;
  }
}

/* Static catalogue helpers */
.product-dropdown { max-height: 420px; overflow-y: auto; }

/* Product category pagination */
.rayshine-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 34px 0 0; }
.rayshine-pagination a, .rayshine-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 0 12px; border: 1px solid #cbd4df; color: var(--blue); background: #fff; text-decoration: none; font-size: 14px; line-height: 1; }
.rayshine-pagination a:hover, .rayshine-pagination a:focus { border-color: var(--blue); background: #eef4fa; }
.rayshine-pagination .current { border-color: var(--blue); color: #fff; background: var(--blue); }
.rayshine-pagination .dots { border-color: transparent; background: transparent; }
.rayshine-pagination .is-disabled { color: #9aa7b5; background: #f4f6f8; cursor: not-allowed; }
.rayshine-pagination .page-status { min-width: auto; border-color: transparent; background: transparent; color: #5f6d7b; }
.series-grid.has-empty-state { display: block; }
.series-empty,
.noscript-message {
  padding: 24px;
  background: #f1f1f1;
  color: #555;
  font-size: 13px;
}

/* High-resolution artwork supplied for the client preview */
.hero::before {
  background: url('./hero-banner-hd.webp') center center / cover no-repeat;
  transform: none;
}

.profile-showcase {
  grid-template-columns: 1.12fr 1.52fr;
  align-items: stretch;
}
.profile-company-card,
.profile-history-card {
  position: relative;
  min-height: 292px;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}
.profile-company-card > img,
.profile-history-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-company-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3,16,33,.82) 0%, rgba(3,16,33,.42) 44%, rgba(3,16,33,.08) 100%);
}
.profile-company-copy {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 292px;
  padding: 31px 31px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.profile-company-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 27px;
  line-height: 1;
  letter-spacing: .2px;
}
.profile-white-rule {
  width: 49px;
  height: 2px;
  margin-top: 16px;
  background: rgba(255,255,255,.9);
}
.profile-company-copy p {
  max-width: 305px;
  margin: 24px 0 0;
  color: #fff;
  font-size: 9px;
  line-height: 1.45;
  font-weight: 700;
}
.profile-more {
  margin-top: auto;
  min-width: 65px;
  padding: 7px 12px 6px;
  background: #fff;
  color: #102643;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
}
.profile-history-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.profile-history-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,14,29,.38) 0%, rgba(2,14,29,.1) 55%, rgba(2,14,29,.12) 100%);
}
.profile-history-copy {
  position: relative;
  z-index: 1;
  padding: 28px 13px 18px;
}
.profile-orange-rule {
  display: block;
  width: 31px;
  height: 2px;
  margin-bottom: 23px;
  background: var(--orange);
}
.profile-history-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1;
}
.profile-history-copy p {
  margin: 0;
  color: #fff;
  font-size: 7.2px;
  line-height: 1.25;
  font-weight: 700;
}

.product-lineup img {
  object-fit: cover;
}
.home-product-card {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.home-product-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}
.home-product-card h3 {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 17px 8px 0;
}

.category-card {
  position: relative;
}
.category-card img.category-art-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}
.category-card h2 {
  position: relative;
  z-index: 1;
}

@media (min-width: 901px) {
  .hero::before {
    background: url('./hero-banner-hd.webp') center center / cover no-repeat;
  }
}

@media (max-width: 900px) {
  .hero::before {
    background:
      linear-gradient(90deg, rgba(4,16,31,.92), rgba(4,16,31,.28)),
      url('./hero-banner-hd.webp') 62% center / cover no-repeat;
  }
  .profile-showcase {
    grid-template-columns: 1fr;
  }
  .profile-company-card,
  .profile-company-copy {
    min-height: 300px;
  }
  .profile-history-card {
    min-height: 250px;
  }
}

@media (max-width: 640px) {
  .profile-history-cards {
    grid-template-columns: 1fr;
  }
  .profile-company-copy h2 {
    font-size: 25px;
  }
  .profile-history-card {
    min-height: 280px;
  }
  .profile-history-copy p {
    font-size: 9px;
    max-width: 190px;
  }
}

/* Keep the carousel rules last: supplied homepage fidelity rules also style these cards. */
.profile-history-viewport {
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.profile-history-viewport::-webkit-scrollbar { display: none; }
.profile-history-cards {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 8px;
  min-width: 100% !important;
}
.profile-history-card { flex: 0 0 calc((100% - 8px) / 2); scroll-snap-align: start; }

@media (max-width: 640px) {
  .profile-history-card { flex-basis: 100%; }
}

/* Version 21 refinements from the live preview. */
.nav-submenu-toggle {
  display: inline-grid;
  width: 16px;
  height: 24px;
  margin: 0 0 0 7px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 0;
  vertical-align: middle;
}
.nav-submenu-toggle::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease, margin .18s ease;
}
.nav-item.submenu-open .nav-submenu-toggle::before {
  margin-top: 3px;
  transform: rotate(225deg);
}

@media (min-width: 901px) {
  .home-profile .container {
    width: min(1200px, calc(100% - 64px));
    max-width: none;
  }
  .profile-showcase {
    grid-template-columns: minmax(390px, 1.05fr) minmax(0, 1.95fr);
    gap: 46px;
  }
  .profile-history-carousel { padding: 0 58px; }
  .profile-history-card { flex-basis: calc((100% - 16px) / 3); }
  .profile-carousel-button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(4,16,31,.24);
    font-size: 25px;
  }
  .profile-carousel-button.previous { left: 0; }
  .profile-carousel-button.next { right: 0; }
}

@media (max-width: 900px) {
  .site-menu .nav-submenu-toggle { width: 28px; height: 36px; padding: 0; }
  .profile-history-card { flex-basis: calc((100% - 8px) / 2); }
}

/* Version 22: preserve the original cards; create room by moving the whole strip left. */
@media (min-width: 901px) {
  .home-profile .container {
    width: min(1548px, calc(100% - 80px));
    max-width: none;
  }
  .profile-showcase {
    width: 100%;
    max-width: none;
    margin: 0;
    grid-template-columns: 474px minmax(0, 1fr);
    gap: 60px;
  }
  .profile-company-card,
  .profile-company-copy,
  .profile-history-card {
    height: 292px;
    min-height: 292px;
  }
  .profile-history-carousel { padding: 0 72px; }
  .profile-history-cards { gap: 8px; }
  .profile-history-card { flex: 0 0 262px; }
  .profile-carousel-button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #97a0a9;
    box-shadow: none;
    color: #fff;
    font-size: 0;
    line-height: 0;
  }
  .profile-carousel-button::before {
    content: "";
    width: 12px;
    height: 12px;
    background: center / 12px 12px no-repeat;
  }
  .profile-carousel-button.previous::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10.5 2.5 5 8l5.5 5.5' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
  }
  .profile-carousel-button.next::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m5.5 2.5L11 8l-5.5 5.5' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
  }
}

/* The menu caret occupies the same 41px visual line as its link. */
@media (min-width: 901px) {
  .site-menu .nav-item-has-dropdown { height: 41px; }
  .site-menu .nav-submenu-toggle {
    width: 18px;
    height: 41px;
    margin-left: 7px;
    align-self: stretch;
  }
  .site-menu .nav-submenu-toggle::before { margin-top: 6px; }
}

/* Version 24: supplied banner and one continuous, artwork-only profile carousel. */
.hero.hero-image-only {
  width: 100%;
  min-height: 0;
  aspect-ratio: 8005 / 2724;
  background: var(--navy);
}
.hero.hero-image-only::before {
  background: var(--rayshine-home-banner-image, url('./home-hero-banner.webp')) center / cover no-repeat;
  transform: none;
}

.home-profile .container {
  width: min(1016px, calc(100% - 40px));
  max-width: none;
}
.profile-showcase.profile-history-carousel {
  --profile-carousel-height: 342px;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 48px;
}
.profile-showcase .profile-history-viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}
.profile-showcase .profile-history-viewport::-webkit-scrollbar {
  display: none;
}
.profile-showcase .profile-history-cards {
  display: flex !important;
  width: max-content;
  min-width: 0 !important;
  gap: 8px;
}
.profile-carousel-card {
  display: block;
  flex: 0 0 auto;
  height: var(--profile-carousel-height);
  overflow: hidden;
  background: var(--navy);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.profile-carousel-company {
  aspect-ratio: 2143 / 1906;
}
.profile-carousel-history {
  aspect-ratio: 949 / 1906;
}
.profile-carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.profile-showcase .profile-carousel-button {
  display: grid;
  top: 50%;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid #7c8792;
  border-radius: 50%;
  background: #f4f4f4;
  box-shadow: none;
  color: #102643;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
}
.profile-showcase .profile-carousel-button.previous {
  left: 0;
}
.profile-showcase .profile-carousel-button.next {
  right: 0;
}
.profile-showcase .profile-carousel-button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  background: none !important;
}
.profile-showcase .profile-carousel-button.previous::before {
  transform: rotate(45deg);
  margin-left: 4px;
}
.profile-showcase .profile-carousel-button.next::before {
  transform: rotate(225deg);
  margin-right: 4px;
}
.profile-showcase .profile-carousel-button:hover:not(:disabled) {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}
.profile-showcase .profile-carousel-button:disabled {
  opacity: .42;
  cursor: default;
}

@media (max-width: 900px) {
  .home-profile {
    padding: 72px 0;
  }
  .home-profile .container {
    width: calc(100% - 24px);
  }
  .profile-showcase.profile-history-carousel {
    --profile-carousel-height: clamp(220px, calc((100vw - 104px) * .8894), 342px);
    padding: 0 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-showcase .profile-history-viewport {
    scroll-behavior: auto;
  }
}

/* Version 26: restore the reference Product artwork proportions. */
.home-products .product-lineup {
  position: relative;
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: 1600 / 466;
  overflow: hidden;
  border: 0 !important;
  outline: 0;
}
.home-products .product-lineup img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}
.product-lineup-label {
  position: absolute;
  z-index: 2;
  top: 30px;
  left: 30px;
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
}
.home-products .home-product-grid > .home-product-card {
  min-height: 0 !important;
  aspect-ratio: 1242 / 1158;
  padding: 0 !important;
}
.home-products .home-product-row-2 > .home-product-card {
  min-height: 0 !important;
  aspect-ratio: 984 / 1059;
  padding: 0 !important;
}
.home-products .home-product-card img {
  width: 100%;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover;
}

@media (max-width: 640px) {
  .product-lineup-label {
    top: 16px;
    left: 16px;
    font-size: 10px;
  }
}

/* Version 27: restore Product spacing and keep the homepage contact columns aligned. */
.home-products .product-showcase:not(.wp-block-group) .home-product-grid {
  margin-top: 7px !important;
}

.home-contact .contact-form {
  width: 100%;
  margin: 38px auto 0;
}
.home-contact .contact-form .form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
}
.home-contact .contact-form .field-line {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
  margin: 0 !important;
}
.home-contact .contact-form .field-label {
  width: auto !important;
  min-width: 0 !important;
  height: 46px;
  padding: 0 13px !important;
  box-sizing: border-box;
}
.home-contact .contact-form .field-control {
  display: block;
  width: 100% !important;
  min-width: 0;
  height: 46px !important;
  box-sizing: border-box;
}
.home-contact .contact-form .message-wrap {
  margin-top: 20px !important;
}
.home-contact .contact-form .message-wrap textarea {
  display: block;
  width: 100%;
  min-height: 162px;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  .home-contact .contact-form .form-grid {
    grid-template-columns: 1fr !important;
  }
}
