/*
Theme Name: UC4 Gutenberg – WMS Projects
Template: uc4-gutenberg
Version: 1.0.0
Text Domain: uc4-gutenberg-wms
*/

/* ==========================================================================
   WMS Projects (Child Theme)
   Strict: theme.json tokens only (flat colours, no textures).
   ========================================================================== */

/* Readable line length for long-form content */
.wp-site-blocks .is-layout-constrained > :where(p, ul, ol, blockquote),
.wp-site-blocks .wp-block-post-content > :where(p, ul, ol, blockquote) {
  max-width: 75ch;
}

/* Accessible focus ring */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--wp--preset--color--silver);
  outline-offset: 2px;
}

/* ==========================================================================
   GLOBAL BUTTON NORMALISATION (THIS IS THE IMPORTANT BIT)
   - Same height + padding for ALL button variants
   - Outline does NOT change size
   - Colour variants are purely classes/tokens
   ========================================================================== */

.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wp--preset--spacing--space-2);

  /* Consistent sizing */
  min-height: 44px;
  padding: var(--wp--preset--spacing--space-3) var(--wp--preset--spacing--space-5);
  line-height: 1.1;

  /* Consistent shape */
  border-radius: var(--wp--custom--wms--radius--md);

  /* IMPORTANT: keep borders from changing size */
  box-sizing: border-box;
  border: 2px solid transparent;

  text-decoration: none;
}

/* Never underline buttons (your global a:hover rules can catch anchors) */
.wp-block-button .wp-block-button__link:hover {
  text-decoration: none;
}

/* Filled buttons: keep border aligned with background when possible */
.wp-block-button .wp-block-button__link.has-accent-background-color {
  border-color: var(--wp--preset--color--accent);
}
.wp-block-button .wp-block-button__link.has-white-background-color {
  border-color: var(--wp--preset--color--white);
}
.wp-block-button .wp-block-button__link.has-ink-background-color {
  border-color: var(--wp--preset--color--ink);
}

/* Outline variant: SAME padding/height as filled, just transparent background */
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border-color: currentColor; /* uses the text colour class */
}

/* If you want an outline button to appear "white filled" in a dark hero:
   (you can keep is-style-outline if you want, but it will be filled white) */
.wp-block-button.is-style-outline .wp-block-button__link.has-white-background-color {
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--ink);
  border-color: var(--wp--preset--color--white);
}

/* ==========================================================================
   Header (classic header.php)
   Layout: logo | menu | CTA
   Mobile-first: burger -> panel
   ========================================================================== */

.wms-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.wms-skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  z-index: 9999;
  background: var(--wp--preset--color--white);
  border: 2px solid var(--wp--preset--color--accent);
  border-radius: 10px;
}

.wms-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--wp--preset--color--white);
  border-bottom: 1px solid rgba(255,255,255,0.12);

  background-color: #383a3d;
  background-image: url("/wp-content/themes/uc4-gutenberg-wms-projects/assets/textures/wms-texture-dark-grain.webp");
  background-repeat: repeat;
  background-position: top left;
  background-size: 320px 320px;
}

.wms-header__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.wms-header__brand a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.wms-header__brand .custom-logo {
  display: block;
}

.wms-header__nav,
.wms-header__cta {
  display: none;
}

/* Burger */
.wms-header__toggle {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.wms-header__toggle-bars {
  width: 18px;
  height: 12px;
  position: relative;
}
.wms-header__toggle-bars,
.wms-header__toggle-bars::before,
.wms-header__toggle-bars::after {
  content: "";
  display: block;
  background: rgba(255,255,255,0.92);
  border-radius: 2px;
  height: 2px;
}
.wms-header__toggle-bars::before {
  position: absolute;
  left: 0;
  top: -5px;
  width: 18px;
}
.wms-header__toggle-bars::after {
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
}

/* Primary menu link tuning */
#menu-primary-menu li a {
  color: #fff;
  font-weight: 400;
}

#menu-primary-menu .site-nav__link:hover,
.site-nav__menu .current-menu-item > .site-nav__link {
  border: 0;
}

.wms-btn.wms-btn--cta:hover {
  text-decoration: none !important;
}

/* Mobile panel */
.wms-mobile {
  border-top: 1px solid rgba(255,255,255,0.12);
  background-color: #383a3d;
  background-image: url("/wp-content/themes/uc4-gutenberg-wms-projects/assets/textures/wms-texture-dark-grain.webp");
  background-repeat: repeat;
  background-position: top left;
  background-size: 320px 320px;
}
.wms-mobile__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 16px 18px;
}
.wms-mobile__list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}
.wms-mobile__list a {
  display: block;
  padding: 12px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
}
.wms-mobile__list a:hover {
  background: rgba(255,255,255,0.10);
}

/* Header CTA button */
.wms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.wms-btn--cta {
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--white);
  border: 2px solid var(--wp--preset--color--accent);
}
.wms-btn--cta:hover {
  filter: brightness(0.95);
}
.wms-btn--block {
  width: 100%;
}

/* Desktop */
@media (min-width: 960px) {
  .wms-header__inner {
    grid-template-columns: auto 1fr auto;
    padding: 16px 24px;
  }
  .wms-header__toggle,
  .wms-mobile {
    display: none;
  }
  .wms-header__nav,
  .wms-header__cta {
    display: block;
  }
  .wms-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 22px;
    align-items: center;
  }
  .wms-nav__list a {
    color: rgba(255,255,255,0.90);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 10px;
    border-radius: 10px;
  }
  .wms-nav__list a:hover {
    background: rgba(255,255,255,0.08);
  }
}

/* ==========================================================================
   Footer (classic footer.php)
   ========================================================================== */

.wms-footer {
  color: rgba(255,255,255,0.86);
  padding: 28px 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.wms-footer__inner {
	max-width: 1440px;
	margin: 0 auto;
}

.wms-footer__bottom {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wms-footer__legal {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wms-footer__copyright {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: rgba(255,255,255,0.9);
}

.wms-footer__nav {
	margin: 0;
}

.wms-footer__menu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 0;
	padding: 0;
}

.wms-footer__menu li {
	margin: 0;
	padding: 0;
}

.wms-footer__menu a {
	color: rgba(255,255,255,0.9);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.wms-footer__menu a:hover {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
}

.wms-footer__social {
	display: flex;
	align-items: center;
	gap: 16px;
}

.wms-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border: 2px solid rgba(255,255,255,0.9);
	border-radius: 999px;
	color: var(--wp--preset--color--white);
	text-decoration: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.wms-footer__social-link:hover {
	opacity: 0.9;
	transform: translateY(-1px);
	text-decoration: none;
}

.wms-footer__social-link svg {
	display: block;
	width: 24px;
	height: 24px;
}

@media (min-width: 960px) {
	.wms-footer {
		padding: 30px 24px;
	}

	.wms-footer__bottom {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 24px;
	}

	.wms-footer__legal {
		flex-direction: row;
		align-items: center;
		gap: 22px;
	}

	.wms-footer__social {
		justify-content: flex-end;
	}
}

/* ==========================================================================
   Component helpers for patterns (token-only)
   ========================================================================== */

.wms-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--silver);
  border-radius: 12px;
  padding: 22px;
}

.wms-card--shadow {
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
}

.wms-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--wp--preset--color--mist);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--wp--preset--color--accent);
}

.wms-media-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 768px) {
  .wms-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.wms-media-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--wp--preset--color--silver);
}

.wms-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--wp--preset--color--mist);
  border: 1px solid var(--wp--preset--color--silver);
}
.wms-pill__item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
}

/* Checklist bullets */
.wms-checklist { list-style: none; padding-left: 0; margin: 18px 0; }
.wms-checklist li { position: relative; padding-left: 28px; margin: 10px 0; }
.wms-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--wp--preset--color--accent);
  font-weight: 800;
}

/* ==========================================================================
   WMS Buttons — consistent sizing, token-based variants
   - widths are content-based (NOT equal)
   - consistent height/padding/font-size across variants
   ========================================================================== */

/* Base button sizing (applies to ALL WP buttons) */
.wp-block-button .wp-block-button__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-height:44px;
  padding:12px 18px;

  font-size:16px;
  line-height:1;       /* locks height consistency */
  font-weight:600;

  border-radius:10px;
  border:2px solid transparent;
  box-sizing:border-box;

  text-decoration:none;
  white-space:nowrap;  /* prevents wrap-induced size changes */
}

/* Primary: accent background */
.wp-block-button .wp-block-button__link.has-accent-background-color{
  border-color:var(--wp--preset--color--accent);
}
.wp-block-button .wp-block-button__link.has-accent-background-color:hover{
  filter:brightness(0.95);
  text-decoration:none;
}

/* Outline style: transparent background, border uses currentColor */
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline{
  background:transparent;
  border-color:currentColor;
}

/* White solid variant (use class on the BUTTON wrapper) */
.wp-block-button.wms-btn--white .wp-block-button__link{
  background:var(--wp--preset--color--white) !important;
  border-color:var(--wp--preset--color--white) !important;
  color:var(--wp--preset--color--ink) !important;
}
.wp-block-button.wms-btn--white .wp-block-button__link:hover{
  background:var(--wp--preset--color--mist) !important;
  border-color:var(--wp--preset--color--mist) !important;
  color:var(--wp--preset--color--ink) !important;
  text-decoration:none;
}

/* Hero cover: ensure image stays top-aligned consistently */
.hero-dark .wp-block-cover__image-background{
  object-position: 50% 0% !important;
}


/* ==========================================================================
   WMS Texture Utilities
   Theme-controlled section textures
   ========================================================================== */

.wms-texture-dark,
.wms-texture-dark-soft,
.wms-texture-light {
	position: relative;
	background-repeat: repeat;
	background-position: top left;
}

.wms-texture-dark {
	background-color: #383a3d;
	background-image: url("/wp-content/themes/uc4-gutenberg-wms-projects/assets/textures/wms-texture-dark-grain.webp");
	background-size: 320px 320px;
}

.wms-texture-dark-soft {
	background-color: #404246;
	background-image: url("/wp-content/themes/uc4-gutenberg-wms-projects/assets/textures/wms-texture-dark-soft.webp");
	background-size: 360px 360px;
}

.wms-texture-light {
	background-color: #e6e3de;
	background-image: url("/wp-content/themes/uc4-gutenberg-wms-projects/assets/textures/wms-texture-light-concrete.webp");
	background-size: 420px 420px;
}




/* USP Bar */
.wms-usp-bar .wms-usp__title,
.wms-usp-bar .wms-usp__sub {
  margin: 0;
}

.wms-usp-bar .wms-usp__title {
  line-height: 1.2;
  font-weight: 700;
}

.wms-usp-bar .wms-usp__sub {
  opacity: 0.65; /* still ink, but lighter like screenshot */
  font-size: 14px;
  line-height: 1.25;
  margin-top: 4px;
}

/* icon: no border, no background, consistent size */
.wms-usp-bar .wms-usp__icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

/* spacing between icon and text */
.wms-usp-bar .wms-usp__inner {
  gap: 12px;
}

/* Responsive: 2x2 on smaller screens, 4 across on desktop */
@media (max-width: 900px) {
  .wms-usp-bar__cols {
    flex-wrap: wrap;
  }
  .wms-usp-bar__cols > .wp-block-column {
    flex-basis: 50% !important;
  }
}
@media (max-width: 520px) {
  .wms-usp-bar__cols > .wp-block-column {
    flex-basis: 100% !important;
  }
}

/* USP bar container: border + rounded corners like the example */
.wms-usp-bar{
  border: 1px solid var(--wp--preset--color--silver);
  border-radius: 16px;
  padding: var(--wp--preset--spacing--space-5) var(--wp--preset--spacing--space-6);
}

/* Columns spacing */
.wms-usp-bar__cols{
  gap: var(--wp--preset--spacing--space-6);
}

/* Each item: icon left, text right */
.wms-usp-item{
  gap: var(--wp--preset--spacing--space-4);
  align-items: flex-start;
}

/* Icon: no border, no background, fixed size */
.wms-usp-icon{
  margin: 0;
  flex: 0 0 auto;
}
.wms-usp-icon img{
  width: 34px;
  height: 34px;
  display: block;
}

/* Text styling: darker + consistent */
.wms-usp-title{
  margin: 0 0 4px 0;
  color: var(--wp--preset--color--ink);
  font-weight: 700;
  line-height: 1.2;
}
.wms-usp-sub{
  margin: 0;
  color: var(--wp--preset--color--ink);
  opacity: 0.70;
  line-height: 1.25;
}


.wms-services-section__inner {
	padding-top: 56px;
	padding-bottom: 56px;
}

.wms-services-section__title {
	margin: 0 0 24px;
}

.wms-services-grid {
	gap: 24px;
}

.wms-service-card {
	height: 100%;
	padding: 14px 16px;
	border: 1px solid #cfd3d8;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.wms-service-card__top {
	align-items: flex-start;
	gap: 12px;
}

.wms-service-card__icon {
	margin: 0;
	width: 26px;
	min-width: 26px;
}

.wms-service-card__icon img {
	width: 26px;
	height: 26px;
	display: block;
}

.wms-service-card__title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.1;
}

.wms-service-card__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.35;
	color: #5f6670;
}

.wms-service-card__link {
	margin-top: 8px;
	font-size: 14px;
	font-weight: 600;
}

.wms-service-card__link a {
	text-decoration: none;
}

.wms-service-card__link a:hover {
	text-decoration: underline;
}


.wms-recent-projects-section__inner {
	padding-top: 72px;
	padding-bottom: 72px;
}

.wms-recent-projects-section__title {
	margin: 0 0 28px;
	font-size: clamp(2rem, 2.4vw, 3rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.wms-recent-projects-grid {
	gap: 28px;
}

.wms-project-card {
	height: 100%;
}

.wms-project-card__image {
	margin: 0 0 18px;
	overflow: hidden;
	border-radius: 14px;
}

.wms-project-card__image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 14px;
}

.wms-project-card__title {
	margin: 0 0 10px;
	font-size: clamp(1.5rem, 1.6vw, 2.1rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
}

.wms-project-card__text {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.9);
	max-width: 95%;
}

.wms-project-card__buttons {
	margin-top: 0;
}

.wms-project-card__button .wp-block-button__link {
	min-width: 180px;
	padding: 0.9rem 1.4rem;
	border-radius: 12px;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1;
	background: #1f4a84;
	border: 0;
}

.wms-project-card__button .wp-block-button__link:hover {
	opacity: 0.92;
}

@media (max-width: 781px) {
	.wms-recent-projects-section__inner {
		padding-top: 44px;
		padding-bottom: 44px;
	}

	.wms-project-card__text {
		max-width: 100%;
	}
}


.wms-cta-band {
	margin-top: 0;
	margin-bottom: 0;
}

.wms-cta-band__inner {
	padding-top: 48px;
	padding-bottom: 48px;
}

.wms-cta-band__cols {
	gap: 32px;
}

.wms-cta-band__title {
	margin: 0 0 18px;
	font-size: clamp(2rem, 2.4vw, 3.2rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.wms-cta-band__line {
	margin: 0 0 14px;
	font-size: clamp(1.2rem, 1.35vw, 2rem);
	font-weight: 600;
	line-height: 1.25;
}

.wms-cta-band__line:last-child {
	margin-bottom: 0;
}

.wms-cta-band__col--actions {
	display: flex;
	justify-content: flex-end;
}

.wms-cta-band__buttons {
	width: 100%;
	align-items: flex-end;
	gap: 16px;
}

.wms-cta-band__button {
	width: 100%;
	max-width: 300px;
}

.wms-cta-band__button .wp-block-button__link {
	display: block;
	width: 100%;
	padding: 18px 24px;
	border-radius: 14px;
	font-size: clamp(1.1rem, 1.1vw, 1.6rem);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18) inset;
}

.wms-cta-band__button--primary .wp-block-button__link {
	background: #1f4a84;
	color: #fff;
}

.wms-cta-band__button--secondary .wp-block-button__link {
	background: #fff;
	color: #111;
}

.wms-cta-band__button .wp-block-button__link:hover {
	opacity: 0.94;
}

@media (max-width: 781px) {
	.wms-cta-band__inner {
		padding-top: 32px;
		padding-bottom: 32px;
	}

	.wms-cta-band__buttons {
		align-items: stretch;
	}

	.wms-cta-band__button {
		max-width: none;
	}
}




.wms-installations-coverage__inner {
	padding-top: 72px;
	padding-bottom: 72px;
}

.wms-installations-coverage__cols {
	gap: 40px;
}

.wms-installations-coverage__title {
	margin: 0 0 10px;
	font-size: clamp(2rem, 2.6vw, 3.1rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.wms-installations-coverage__intro {
	margin-bottom: 18px;
	align-items: center;
	gap: 16px;
}

.wms-installations-coverage__sub {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: rgba(255,255,255,0.92);
}

.wms-installations-coverage__stars {
	margin: 0;
	font-size: 26px;
	line-height: 1;
	letter-spacing: 4px;
	color: #f2cf3a;
	white-space: nowrap;
}

.wms-installations-grid {
	gap: 18px;
}

.wms-installations-grid .wp-block-column {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.wms-installations-grid__image {
	margin: 0;
	overflow: hidden;
	border-radius: 12px;
}

.wms-installations-grid__image img {
	display: block;
	width: 100%;
	height: 132px;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid rgba(255,255,255,0.08);
}

.wms-coverage-card {
	padding: 30px 30px 34px;
	border-radius: 18px;
	box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.wms-coverage-card__title {
	margin: 0 0 12px;
	font-size: clamp(2rem, 2vw, 2.8rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.wms-coverage-card__text {
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.45;
	color: #2f3134;
	max-width: 28ch;
}

.wms-coverage-card__list {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	display: grid;
	gap: 18px;
}

.wms-coverage-card__list li {
	position: relative;
	padding-left: 40px;
	font-size: clamp(1.5rem, 1.4vw, 2rem);
	line-height: 1.2;
	font-weight: 500;
}

.wms-coverage-card__list li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: #1f4a84;
	font-weight: 700;
}

.wms-coverage-card__buttons {
	margin-top: 0;
}

.wms-coverage-card__button .wp-block-button__link {
	min-width: 210px;
	padding: 0.95rem 1.5rem;
	border-radius: 12px;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
	background: #1f4a84;
	border: 0;
}

.wms-coverage-card__button .wp-block-button__link:hover {
	opacity: 0.94;
}

@media (max-width: 900px) {
	.wms-installations-coverage__intro {
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.wms-installations-coverage__stars {
		letter-spacing: 2px;
	}
}

@media (max-width: 781px) {
	.wms-installations-coverage__inner {
		padding-top: 44px;
		padding-bottom: 44px;
	}

	.wms-installations-grid .wp-block-column {
		gap: 14px;
	}

	.wms-installations-grid {
		gap: 14px;
	}

	.wms-installations-grid__image img {
		height: 180px;
	}

	.wms-coverage-card {
		padding: 24px;
	}
}