/*
Theme Name: Clean Team Sussex
Theme URI: https://cleanteamsussex.co.uk
Author: Ahamed
Description: Custom theme for Clean Team Sussex. White pages with black header, footer and feature bands, in the blue and pink of the logo.
Version: 2.0.6
Requires at least: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: clean-team-sussex
*/

/* ---------- Base ---------- */
html { scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
::selection { background: var(--wp--preset--color--pink); color: #000; }
:focus-visible { outline: 3px solid var(--wp--preset--color--blue); outline-offset: 2px; border-radius: 6px; }
img { height: auto; }
h1, h2, h3, h4 { text-wrap: balance; }

/* Dark zones (header, footer, black bands and tiles) keep the original black look:
   the colour presets are switched back to their dark values inside them. */
.ct-header, .ct-footer, .ct-deep, .ct-dark {
  --wp--preset--color--page: #0a0a0f;
  --wp--preset--color--soft: #1a1a22;
  --wp--preset--color--surface: #16161e;
  --wp--preset--color--tint: #170f1a;
  --wp--preset--color--line: #2a2a35;
  --wp--preset--color--field: #43434f;
  --wp--preset--color--ink: #ffffff;
  --wp--preset--color--body: #d5d9e0;
  --wp--preset--color--muted: #a2a8b3;
  --wp--preset--color--blue-ink: #00c5ff;
  color: var(--wp--preset--color--body);
}
.ct-deep a:where(:not(.wp-element-button)), .ct-dark a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--blue); }

/* ---------- Header ---------- */
.ct-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .ct-header { top: var(--wp-admin--admin-bar--height, 32px); }
.ct-header .ct-logo img { height: 56px; width: auto; display: block; }
.ct-header .wp-block-navigation a { font-weight: 600; color: #fff; text-decoration: none; }
.ct-header .wp-block-navigation a:hover { color: var(--wp--preset--color--blue); }
.ct-header .wp-block-navigation__responsive-container.is-menu-open {
  background: #000 !important; color: #fff !important; padding: 1.5rem;
}
.ct-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { font-size: 1.25rem; }
.ct-header .wp-block-navigation__responsive-container-open,
.ct-header .wp-block-navigation__responsive-container-close { color: #fff; }
@media (max-width: 599px) {
  .ct-header .wp-block-navigation__responsive-container-open {
    width: 44px; height: 44px; border: 1px solid var(--wp--preset--color--line); border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
  }
}
@media (max-width: 781px) {
  .ct-header .ct-hide-mobile, .ct-header .ct-call-num { display: none !important; }
  .ct-header .ct-logo img { height: 46px; }
}

/* ---------- Buttons ---------- */
.wp-block-button .wp-block-button__link { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.wp-block-button .wp-block-button__link svg { width: 20px; height: 20px; }
.wp-block-button.is-style-pink .wp-block-button__link { background: var(--wp--preset--color--pink); color: #000; }
.wp-block-button.is-style-pink .wp-block-button__link:hover { background: #ff4db5; }
.wp-block-button.is-style-outline-dark .wp-block-button__link {
  background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); border: 2px solid var(--wp--preset--color--line);
}
.wp-block-button.is-style-outline-dark .wp-block-button__link:hover { border-color: var(--wp--preset--color--blue); }
.wp-block-button.ct-pill .wp-block-button__link { min-height: 44px; border-radius: 999px; padding: .5rem 1.1rem; font-size: 1rem; }
.wp-block-button__link:hover { filter: brightness(1.05); }
.ct-header .ct-pill .wp-block-button__link svg { width: 18px; height: 18px; }
.ct-header .ct-call-num { white-space: pre; }

/* ---------- Sections & cards ---------- */
.ct-section { padding-block: clamp(3.5rem, 7vw, 5rem); }
.ct-soft { background: var(--wp--preset--color--soft); }
.ct-deep { background: var(--wp--preset--color--deep); }
.ct-tint { background: var(--wp--preset--color--tint); }
.ct-kicker { font-size: .8125rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--blue-ink); margin-bottom: .5rem !important; }
.ct-kicker.is-pink { color: var(--wp--preset--color--pink); }
.ct-card {
  background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line);
  border-radius: 18px; padding: 1.5rem;
}
.ct-card > *:first-child { margin-top: 0; }
.ct-photo img, .ct-photo { border-radius: 20px; }
.ct-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.ct-pill-label {
  display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--wp--preset--color--line);
  background: var(--wp--preset--color--surface); border-radius: 999px; padding: .35rem .9rem; font-weight: 600; color: var(--wp--preset--color--ink); font-size: .9rem;
}
.ct-pill-label svg { width: 16px; height: 16px; color: var(--wp--preset--color--blue-ink); }
.ct-muted { color: var(--wp--preset--color--muted); }
.ct-lead { font-size: 1.125rem; }

/* Check-mark lists */
ul.is-style-checks, .ct-checks { list-style: none; padding-left: 0; display: grid; gap: .75rem; }
ul.is-style-checks li, .ct-checks li { position: relative; padding-left: 2.25rem; }
ul.is-style-checks li::before, .ct-checks li::before {
  content: ""; position: absolute; left: 0; top: .1rem; width: 1.5rem; height: 1.5rem; border-radius: 999px;
  background: var(--wp--preset--color--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff0095' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.ct-trust li::before { background-color: transparent; border: 2px solid #0075a3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230075a3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.ct-trust li { font-weight: 600; color: var(--wp--preset--color--ink); }

/* Towns: one black band with every town as a pill */
ul.ct-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.75rem 0 0; }
ul.ct-chips li { border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-weight: 600; border-radius: 999px; padding: .35rem .8rem; font-size: .9375rem; }

/* Numbered reasons */
.ct-num { font-family: var(--wp--preset--font-family--display); font-size: 2rem; font-weight: 700; color: var(--wp--preset--color--pink); margin-bottom: .25rem !important; }

/* CTA band */
.ct-cta { border-block: 1px solid rgba(255, 0, 149, .4); }

/* Referrals / review card */
.ct-referral { border-top: 4px solid var(--wp--preset--color--pink); text-align: center; max-width: 48rem; margin-inline: auto; }
.ct-referral .ct-social { justify-content: center; }

/* ---------- Service photo tiles (shortcode [ct_services]) ---------- */
.ct-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .ct-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ct-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ct-tiles .ct-tile-wide { grid-column: span 2; } }
.ct-tile { position: relative; display: block; overflow: hidden; border-radius: 18px; background: #000; text-decoration: none !important; }
/* Tiles in the same row stretch to the tallest one (e.g. next to the reviews tile) */
.ct-tiles > li { display: flex; min-width: 0; }
.ct-tiles > li > .ct-tile, .ct-tiles > li > .ct-review-tile { flex: 1; width: 100%; }
.ct-tile img { height: 100%; min-height: 0; }
.ct-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; opacity: .7; transition: transform .3s, opacity .3s; }
.ct-tile:hover img { transform: scale(1.05); opacity: .5; }
.ct-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #000, rgba(0, 0, 0, .4) 50%, transparent); }
.ct-tile__text { position: absolute; inset-inline: 0; bottom: 0; z-index: 1; padding: 1.25rem; }
.ct-tile__title { display: block; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.5rem; color: #fff; }
.ct-tile__blurb { display: block; margin-top: .25rem; font-size: .9375rem; line-height: 1.35; color: #d5d9e0; }
.ct-tile__go { position: absolute; top: 1rem; right: 1rem; z-index: 1; width: 40px; height: 40px; border-radius: 999px; background: var(--wp--preset--color--pink); color: #000; display: flex; align-items: center; justify-content: center; }
.ct-tile__go svg { width: 20px; height: 20px; }

/* Google reviews tile */
.ct-review-tile {
  position: relative; overflow: hidden; height: 100%; min-height: 100%; box-sizing: border-box; aspect-ratio: 4 / 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem;
  border-radius: 18px; color: #000; text-decoration: none !important;
  background: linear-gradient(135deg, #ff0095 0%, #ff3daf 55%, #ff7cc9 100%);
}
@media (min-width: 1024px) { .ct-review-tile { aspect-ratio: auto; } }
.ct-review-tile::before, .ct-review-tile::after { content: ""; position: absolute; border-radius: 999px; background: rgba(255, 255, 255, .14); pointer-events: none; }
.ct-review-tile::before { width: 10rem; height: 10rem; top: -2.5rem; left: -2.5rem; }
.ct-review-tile::after { width: 12rem; height: 12rem; right: -2rem; bottom: -3rem; }
.ct-review-tile > * { position: relative; z-index: 1; }
.ct-stars { display: inline-flex; gap: .25rem; background: #000; color: var(--wp--preset--color--pink); border-radius: 999px; padding: .5rem 1rem; }
.ct-stars svg { width: 20px; height: 20px; fill: currentColor; }
.ct-review-tile__title { margin-top: 1rem; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.1; }
.ct-review-tile__text { margin-top: .5rem; max-width: 24rem; font-weight: 600; line-height: 1.35; }
.ct-review-tile__btn { margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.25rem; border-radius: 999px; background: #000; color: #fff; font-weight: 700; }
.ct-review-tile__btn svg { width: 18px; height: 18px; }

/* Review tile with the live Google reviews slider inside */
.ct-review-tile--live { aspect-ratio: auto !important; justify-content: center; gap: .6rem; padding: 1rem 1rem 1.25rem; }
.ct-review-tile__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; }
.ct-review-tile--live .ct-review-tile__title { margin-top: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.ct-review-tile__slider { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; text-align: left; color: #111118; }
.ct-review-tile__slider .ti-widget { margin: 0 !important; }
.ct-review-tile--live .ct-review-tile__btn { margin-top: .25rem; text-decoration: none !important; }
.ct-review-tile--live .ct-review-tile__btn:hover { background: #222; }

/* Compact service list (other services, on service pages) */
.ct-services { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.ct-service {
  display: flex; align-items: center; gap: 1rem; height: 100%; text-decoration: none !important;
  background: #000; border: 1px solid #2a2a35; border-radius: 18px; padding: 1.1rem 1.25rem;
  transition: border-color .15s, box-shadow .15s;
}
.ct-service:hover { border-color: var(--wp--preset--color--blue); box-shadow: 0 8px 30px -12px rgba(0, 197, 255, .35); }
.ct-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--wp--preset--color--tint); color: var(--wp--preset--color--pink); display: flex; align-items: center; justify-content: center; }
.ct-service .ct-icon { background: #170f1a; }
.ct-icon svg { width: 22px; height: 22px; }
.ct-service__text { flex: 1; min-width: 0; }
.ct-service__title { display: block; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.125rem; color: #fff; }
.ct-service__chev { color: #a2a8b3; }
.ct-service:hover .ct-service__chev { color: var(--wp--preset--color--blue); }

/* ---------- Post cards ---------- */
.ct-posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.ct-post-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none !important; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 18px; }
.ct-post-card:hover { border-color: var(--wp--preset--color--pink); }
.ct-post-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; display: block; }
.ct-post-card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: .35rem; }
.ct-post-card__date { font-size: .875rem; color: var(--wp--preset--color--muted); }
.ct-post-card__title { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.25rem; color: var(--wp--preset--color--ink); }
.ct-post-card__excerpt { font-size: .9375rem; color: var(--wp--preset--color--muted); }

/* Query loop cards (Our work page) */
.ct-query .wp-block-post { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 18px; overflow: hidden; }
.ct-query .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.ct-query .ct-query__body { padding: 0 1.25rem 1.25rem; }
.ct-query .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }

/* ---------- Breadcrumbs ---------- */
.ct-crumbs { font-size: .875rem; color: var(--wp--preset--color--muted); margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.ct-crumbs li + li::before { content: "/"; margin-right: .5rem; }
.ct-crumbs a { font-weight: 500; }

/* ---------- Social & share buttons: black pills, pink on hover ---------- */
.ct-social { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.ct-social a, .ct-share a, .ct-share button {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.25rem; border-radius: 999px; border: 0;
  background: #000; color: #fff !important; font: inherit; font-weight: 700; text-decoration: none !important; cursor: pointer; transition: background .15s, color .15s;
}
.ct-social a:hover, .ct-share a:hover, .ct-share button:hover { background: var(--wp--preset--color--pink); color: #000 !important; }
.ct-social svg, .ct-share svg { width: 18px; height: 18px; }
.ct-share { display: flex; flex-wrap: wrap; gap: .5rem; }
/* Footer social icons: round outlines, pink on hover */
.ct-footer .ct-social a { width: 44px; padding: 0; justify-content: center; background: transparent; border: 1px solid rgba(255, 255, 255, .2); }
.ct-footer .ct-social a .ct-social__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ct-footer .ct-social a:hover { background: var(--wp--preset--color--pink); border-color: var(--wp--preset--color--pink); }

/* ---------- Quote band & form ---------- */
.ct-quote-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .ct-quote-grid { grid-template-columns: 1fr 1.35fr; align-items: start; } .ct-quote-grid > :first-child { position: sticky; top: 7rem; } }
.ct-phone-big { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; font-weight: 700; color: var(--wp--preset--color--ink) !important; text-decoration: none !important; margin-top: 1rem; }
.ct-phone-big span { width: 44px; height: 44px; border-radius: 999px; background: var(--wp--preset--color--pink); color: #000; display: inline-flex; align-items: center; justify-content: center; }
.ct-phone-big svg { width: 20px; height: 20px; }
.ct-form-card { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 18px; padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 20px 50px -20px rgba(255, 0, 149, .25); }
.ct-form-card h2 { margin-top: 0; font-size: 1.75rem; }
.wpcf7 .ct-fields { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .wpcf7 .ct-fields { grid-template-columns: 1fr 1fr; } .wpcf7 .ct-span-2 { grid-column: span 2; } }
.wpcf7 label { display: block; font-weight: 600; color: var(--wp--preset--color--ink); }
.wpcf7 label .ct-opt { font-weight: 400; color: var(--wp--preset--color--muted); }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 select, .wpcf7 textarea {
  display: block; width: 100%; margin-top: .4rem; min-height: 50px; padding: .6rem 1rem; font: inherit; font-size: 16px;
  color: var(--wp--preset--color--ink); background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--field); border-radius: 12px;
}
.wpcf7 textarea { min-height: 140px; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: 3px solid rgba(0, 197, 255, .3); border-color: var(--wp--preset--color--blue); }
.wpcf7 input[type=file] { margin-top: .4rem; color: var(--wp--preset--color--muted); }
.wpcf7 input[type=submit] {
  width: 100%; min-height: 56px; margin-top: 1.25rem; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--wp--preset--color--blue); color: #000; font: inherit; font-weight: 700; font-size: 1.0625rem;
}
.wpcf7 input[type=submit]:hover { background: #66dcff; }
.wpcf7 .wpcf7-not-valid-tip { color: #c4002f; font-size: .875rem; margin-top: .25rem; }
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 12px; border-color: var(--wp--preset--color--blue); color: var(--wp--preset--color--ink); }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border-color: #c4002f; }
.ct-form-note { font-size: .875rem; color: var(--wp--preset--color--muted); text-align: center; margin-top: .75rem; }

/* Call card (contact page) */
.ct-call-card { background: var(--wp--preset--color--deep); border-radius: 20px; padding: 1.75rem; }
.ct-call-card .ct-call-number { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 2.1rem; color: var(--wp--preset--color--pink); text-decoration: none; display: block; }

/* ---------- Footer ---------- */
.ct-footer { background: var(--wp--preset--color--deep); color: var(--wp--preset--color--on-dark); }
.ct-footer a { color: var(--wp--preset--color--on-dark); text-decoration: none; }
.ct-footer a:hover { color: #fff; text-decoration: underline; }
.ct-footer .ct-footer-phone a { color: var(--wp--preset--color--pink); font-weight: 700; }
.ct-footer h2 { font-family: var(--wp--preset--font-family--body); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.ct-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.ct-footer ul.ct-social { display: flex; }
.ct-footer .ct-logo img { height: 80px; width: auto; }

/* Gallery */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 14px; }

/* WordPress can add <br> between form fields on some templates; they would take up grid cells. */
.wpcf7 .ct-fields > br, .wpcf7 .ct-fields > p:empty { display: none; }
.wpcf7 input, .wpcf7 select, .wpcf7 textarea { box-sizing: border-box; max-width: 100%; }
