/*--------------------------------------------------------------
# StroyInvest project overrides
# Loaded after main.css (theme file, never edited). Feature
# sections are added below in order of the feature numbers.
--------------------------------------------------------------*/

/*----------------------------------------*/
/*  00. Foundation
/*----------------------------------------*/

/* Lato and Poppins have no Cyrillic: Bulgarian falls through to Roboto.
   --accent-text-color: the accent #70b9b0 darkened (45% black), 6.2:1 on white and 5.7:1 on #f2f9f8.
   Use it for small text, links and thin UI; keep --accent-color for fills, borders and large text. */
:root {
  --accent-text-color: #3e6661;
  --nav-color: rgba(255, 255, 255, 0.9);
  --heading-font: "Lato", "Roboto", sans-serif;
  --nav-font: "Poppins", "Roboto", sans-serif;
}

/* Skip link: off-screen until focused */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100000;
  padding: 10px 16px;
  background-color: var(--heading-color);
  color: #ffffff;
  font-family: var(--nav-font);
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus {
  position: fixed;
  color: #ffffff;
  outline: 3px solid #ffffff;
  outline-offset: -6px;
}

/* Detail pages: the site name is a span, not the h1 */
.header .logo .sitename {
  font-size: 30px;
  margin: 0;
  font-weight: 700;
  line-height: 1;
  color: var(--heading-color);
}

/* Mobile nav toggle may be a real button */
button.mobile-nav-toggle {
  background: none;
  border: 0;
  padding: 0;
  line-height: 0;
}

/* Keyboard focus. Dark ring on light areas, white ring on dark areas. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.mobile-nav-toggle:focus-visible {
  outline: 3px solid var(--heading-color);
  outline-offset: 2px;
}

.mobile-nav-active .header .mobile-nav-toggle:focus-visible,
.footer a:focus-visible,
.footer button:focus-visible,
.dark-background a:focus-visible,
.dark-background button:focus-visible,
.scroll-top:focus-visible {
  outline-color: #ffffff;
}

.scroll-top:focus-visible {
  outline-offset: -4px;
  box-shadow: 0 0 0 2px var(--heading-color);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  #preloader:before {
    animation: none;
  }

  #preloader,
  .scroll-top {
    transition: none;
  }
}

/*----------------------------------------*/
/*  01. Header and footer
/*----------------------------------------*/

.header {
  --background-color: #7cafa9;
  --default-color: #073839;
  --heading-color: var(--default-color);
  --nav-color: #092422;
  --nav-hover-color: #061513;
  --nav-dropdown-color: var(--nav-color);
  --nav-dropdown-hover-color: var(--nav-hover-color);
  --nav-link-highlight: color-mix(in srgb, var(--nav-color) 8%, transparent);
  --contrast-color: var(--default-color);
}

.header .logo {
  min-width: 0;
  transition-property: color;
}

.header .logo img {
  max-width: 100%;
  object-fit: contain;
  margin-right: 8px;
}

.header-logo-default {
  --header-logo-height: 44px;

  /* Let the larger logo use the header padding while preserving its 30px row height. */
  margin-block: calc((30px - var(--header-logo-height)) / 2);
}

.header .header-logo-default img {
  width: auto;
  height: var(--header-logo-height);
  max-height: none;
  margin-right: 0;
}

.header .navmenu a {
  border-radius: 4px;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.28em;
  transition-property: color, background-color;
}

.header .navmenu a:focus-visible {
  color: var(--nav-hover-color);
  background-color: var(--nav-link-highlight);
  text-decoration-line: underline;
}

@media (hover: hover) {
  .header .navmenu a:hover {
    color: var(--nav-hover-color);
    background-color: var(--nav-link-highlight);
    text-decoration-line: underline;
  }
}

/* Menu items without a link look like links but are plain text */
.navmenu li > span {
  display: block;
  font-family: var(--nav-font);
  cursor: default;
}

/* Language switch: small caps codes */
.navmenu li.lang-switch a {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (min-width: 1200px) {
  .header-logo-default {
    --header-logo-height: 60px;
  }

  .navmenu li > span {
    padding: 18px 15px;
    font-size: 16px;
    white-space: nowrap;
    color: var(--nav-color);
  }

  .navmenu .dropdown ul li > span {
    padding: 10px 20px;
    font-size: 15px;
    color: var(--nav-dropdown-color);
  }

  .navmenu li.lang-switch a {
    padding: 18px 8px;
    font-size: 14px;
  }

  .navmenu li.lang-switch a.lang-current {
    color: var(--nav-hover-color);
    font-weight: 700;
  }

  /* Thin separator between the two language codes, and before the first */
  .navmenu li.lang-switch::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    height: 14px;
    margin-top: -7px;
    border-left: 1px solid var(--nav-color);
  }

  /* Dropdown also opens with the keyboard (focus) and after a click/tap */
  .navmenu .dropdown:focus-within > ul,
  .navmenu .dropdown > ul.dropdown-active {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }

  /* Escape dismisses it while focus stays on the parent link */
  .navmenu .dropdown.dropdown-dismissed:not(:hover) > ul {
    opacity: 0;
    top: 130%;
    visibility: hidden;
  }

  .navmenu .dropdown:focus-within > a,
  .navmenu .dropdown > a.active {
    color: var(--nav-hover-color);
  }

  .navmenu .dropdown > a[aria-expanded="true"] .toggle-dropdown {
    transform: rotate(180deg);
  }

  /* Bulgarian labels are longer: tighter padding before the very wide screens */
  .navmenu a,
  .navmenu li > span {
    padding-left: 11px;
    padding-right: 11px;
  }
}

@media (min-width: 1400px) {
  .navmenu a,
  .navmenu li > span {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 1199px) {
  .navmenu li > span {
    padding: 10px 20px;
    font-size: 17px;
    font-weight: 500;
    color: var(--nav-dropdown-color);
  }

  .navmenu .dropdown ul li > span {
    font-size: 15px;
  }

  /* Language codes sit inline at the end of the off-canvas list */
  .navmenu li.lang-switch {
    display: inline-block;
  }

  .navmenu li.lang-switch a {
    display: inline-flex;
    padding: 10px 12px;
    font-size: 15px;
    min-width: 44px;
    justify-content: center;
  }

  .navmenu li:not(.lang-switch) + li.lang-switch a {
    margin-left: 8px;
  }

  .navmenu li.lang-switch a.lang-current {
    color: #073839;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .navmenu .dropdown a[aria-expanded="true"] .toggle-dropdown {
    transform: rotate(180deg);
  }
}

/* Footer: editor-made rich text matches the theme's address look */
.footer .footer-content {
  min-width: 0;
  overflow-wrap: break-word;
}

.footer .footer-content p {
  margin: 0 0 0.25rem;
}

.footer .credits a {
  color: inherit;
  text-decoration: underline;
}

.footer .credits a:hover {
  text-decoration-thickness: 2px;
}

.footer .social-links {
  flex-wrap: wrap;
  gap: 10px;
}

.footer .social-links a {
  margin-right: 0;
}

/*--------------------------------------------------------------
# 02 Hero
--------------------------------------------------------------*/
.hero h2,
.hero p {
  overflow-wrap: anywhere;
}

/* Charcoal overlay for contrast behind the white banner text. */
.hero:before {
  background: rgb(16 22 26 / 62%);
}

.hero .btn-get-started {
  border-color: var(--default-color);
}

.hero .btn-get-started:focus-visible {
  outline: 3px solid var(--contrast-color);
  outline-offset: 3px;
}

/*--------------------------------------------------------------
# 03 About
--------------------------------------------------------------*/
.about .content ul li span {
  overflow-wrap: anywhere;
}

/* Rich text lists (no check icons) keep normal bullets and numbers */
.about .content ul:not(:has(> li > i)),
.about .content ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.about .content ul:not(:has(> li > i)) {
  list-style: disc;
}

.about .content ul:not(:has(> li > i)) li {
  display: list-item;
  padding: 0;
}

/* Teal on white is below 4.5:1, so links in body text are underlined */
.about .content p a,
.about .content li a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about .content a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Theme lead colour (#aaa) is 2.3:1 on white; use the body text colour, italic keeps it distinct */
.about .content .fst-italic {
  color: var(--default-color);
}

/* Darker teal for text links (accent #70b9b0 is about 2.2:1 on white) */
.about .content p a,
.about .content li a {
  color: var(--accent-text-color);
}

/*--------------------------------------------------------------
# 04 Carousel
--------------------------------------------------------------*/
/* Logos of different aspect ratios share one height and centre in their slide */
.clients .swiper-slide img {
  display: block;
  max-height: 60px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
  /* Logos are always in full colour (the theme greys them out until hover) */
  opacity: 1;
  filter: none;
}

/* Inactive bullet (theme: 20% text colour) is far below 3:1 against the light background */
.clients .swiper-pagination .swiper-pagination-bullet {
  margin: 0 8px;
  background-color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.clients .swiper-pagination .swiper-pagination-bullet-active {
  background-color: var(--accent-text-color);
}

.clients .swiper-pagination .swiper-pagination-bullet:focus-visible {
  outline: 2px solid var(--default-color);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .clients .swiper-slide img {
    transition: none;
  }
}

/*----------------------------------------*/
/*  05. Why us
/*----------------------------------------*/
/* Card titles are h3 (heading order under the section h2); the theme styles h4, so repeat its rules here.
   No link inside, so the theme's "h4 a" colour rules do not apply */
.cards .card-item h3 {
  font-size: 24px;
  font-weight: 600;
  padding: 0;
  margin: 20px 0;
  color: var(--heading-color);
  overflow-wrap: anywhere;
}

/* Theme colours fail 4.5:1 (description at 60% opacity, accent number and white on accent when hovered) */
.cards .card-item {
  --why-us-accent: var(--accent-text-color);
}

.cards .card-item span {
  color: var(--why-us-accent);
}

.cards .card-item p {
  color: var(--default-color);
}

.cards .card-item:hover {
  background: var(--why-us-accent);
}

.cards .card-item:hover h3 {
  color: var(--contrast-color);
}

@media (prefers-reduced-motion: reduce) {
  .cards .card-item {
    transition: none;
  }

  .cards .card-item:hover {
    padding: 50px 30px;
  }
}

/*----------------------------------------*/
/*  06. Services
/*----------------------------------------*/
/* Card titles are h3 (heading order under the section h2); the theme styles h4, so repeat its rules here */
.services .service-item {
  --services-accent: var(--accent-text-color);
}

.services .service-item .title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--heading-color);
  overflow-wrap: anywhere;
}

.services .service-item .description {
  overflow-wrap: anywhere;
}

/* Accent on white is about 2.2:1: hovered link text uses the darker teal */
.services .service-item .title a:hover,
.services .service-item .title a:focus-visible {
  color: var(--services-accent);
}

/* The stretched link covers the card: show the ring on the card, not just the title text */
.services .service-item:has(a:focus-visible) {
  outline: 2px solid var(--services-accent);
  outline-offset: 2px;
}

.services .service-item .title a:focus-visible {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .services .service-item .icon {
    transition: none;
  }
}

/*----------------------------------------*/
/*  07. Call to action
/*----------------------------------------*/
/* Heading is an h2 (heading order); the theme styles h3, so repeat its rules here */
.call-to-action h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--default-color);
  overflow-wrap: anywhere;
}

.call-to-action p {
  overflow-wrap: anywhere;
}

/* The theme overlay (#30ac9d at 50%) leaves white text under 3:1 over light parts of the photo: use a darker teal */
.call-to-action:before {
  background: color-mix(in srgb, #30ac9d 40%, #000 60%);
  opacity: 0.8;
}

.call-to-action .cta-btn {
  min-height: 44px;
}

/* White on the accent #70b9b0 is about 2.2:1: use the darker teal for the hover fill */
.call-to-action .cta-btn:hover,
.call-to-action .cta-btn:focus-visible {
  background: var(--accent-text-color);
  border-color: var(--contrast-color);
}

.call-to-action .cta-btn:focus-visible {
  outline: 2px solid var(--contrast-color);
  outline-offset: 3px;
}

@media (max-width: 575px) {
  .call-to-action {
    padding: 60px 0;
  }

  .call-to-action h2 {
    font-size: 24px;
  }

  .call-to-action .cta-btn {
    padding: 12px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .call-to-action .cta-btn {
    transition: none;
  }
}

/*----------------------------------------*/
/*  Detail pages (shared with 08)
/*----------------------------------------*/
.page-title .heading h1 {
  overflow-wrap: anywhere;
}

/* Theme line-height 1 cramps two-line Bulgarian names; full text colour for 4.5:1 */
.service-details .services-list a {
  line-height: 1.3;
  color: var(--default-color);
}

.service-details .services-list a.active {
  color: var(--heading-color);
}

/* Headings are h2 under the page h1; the theme styles h3/h4 */
.service-details .service-side-heading {
  font-size: 20px;
  font-weight: 700;
}

.service-details .service-content-heading {
  font-size: 26px;
  font-weight: 700;
}

.service-details .service-side-heading,
.service-details .service-content-heading {
  overflow-wrap: anywhere;
}

.service-details .service-body ul {
  list-style: none;
  padding: 0;
}

.service-details .service-body ul li {
  display: block;
  position: relative;
  padding: 5px 0 5px 1.75em;
}

.service-details .service-body ul li::before {
  content: "\f26a"; /* bi-check-circle-fill */
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.service-details .service-body ol {
  padding-left: 1.5em;
  font-size: 15px;
}

.service-details .service-body ol li {
  padding: 3px 0;
}

.service-details .service-body a {
  text-decoration: underline;
}

/* Accent teal on the breadcrumb grey is about 2.1:1: use the darker teal for link text */
.page-title nav ol a,
.service-details .service-body a {
  color: var(--accent-text-color);
}

.page-title nav ol a:hover,
.service-details .service-body a:hover {
  color: var(--heading-color);
}

.page-title nav ol a:focus-visible,
.service-details .services-list a:focus-visible,
.service-details .service-body a:focus-visible {
  outline: 2px solid var(--accent-text-color);
  outline-offset: 2px;
}

/*----------------------------------------*/
/*  08. Portfolio
/*----------------------------------------*/
/* Filters are real buttons inside the theme's li; the li keeps the theme spacing.
   Accent on white is about 2.2:1, so the active and hovered filter use the darker teal plus an underline. */
.portfolio .portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 20px;
}

.portfolio .portfolio-filters li {
  margin: 0;
}

.portfolio .portfolio-filters button {
  background: none;
  border: 0;
  padding: 4px 2px;
  font: inherit;
  color: var(--default-color);
  cursor: pointer;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.portfolio .portfolio-filters li:hover button,
.portfolio .portfolio-filters li.filter-active button {
  color: var(--accent-text-color);
}

.portfolio .portfolio-filters li.filter-active button {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.portfolio .portfolio-filters button:focus-visible,
.portfolio .portfolio-content .portfolio-info a:focus-visible {
  outline: 2px solid var(--accent-text-color);
  outline-offset: 3px;
}

/* Icon links sit on the dark overlay: white ring */
.portfolio .portfolio-content .portfolio-info a:focus-visible {
  outline-color: #fff;
}

/* Title is an h3 (heading order under the section h2); the theme styles h4.
   Darker teal chip: white on the accent is about 2.2:1. */
.portfolio .portfolio-content .portfolio-info h3 {
  font-size: 14px;
  padding: 5px 10px;
  font-weight: 400;
  color: #fff;
  display: inline-block;
  background-color: var(--accent-text-color);
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Darker overlay and full white text keep captions above 4.5:1 over light photos */
.portfolio .portfolio-content .portfolio-info {
  background: rgba(0, 0, 0, 0.7);
}

.portfolio .portfolio-content .portfolio-info p {
  color: #fff;
  padding: 0 15px;
  overflow-wrap: anywhere;
}

.portfolio .portfolio-content .portfolio-info .preview-link,
.portfolio .portfolio-content .portfolio-info .details-link {
  padding: 4px;
  margin: -4px;
}

.portfolio .portfolio-content .portfolio-info .preview-link:hover,
.portfolio .portfolio-content .portfolio-info .details-link:hover {
  color: var(--accent-color);
}

/* Keyboard focus reveals the overlay (the links inside stay in the tab order) */
.portfolio .portfolio-content:focus-within .portfolio-info,
.portfolio .portfolio-content.is-open .portfolio-info {
  opacity: 1;
}

.portfolio .portfolio-content:focus-within img,
.portfolio .portfolio-content.is-open img {
  transform: scale(1.1);
}

/* No hover (touch): invisible links must not catch the first tap; the first tap opens the overlay (site.js) */
@media (hover: none) {
  .portfolio .portfolio-content:not(.is-open):not(:focus-within) .portfolio-info {
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio .portfolio-content img,
  .portfolio .portfolio-content .portfolio-info,
  .portfolio .portfolio-filters li,
  .portfolio .portfolio-content .portfolio-info a {
    transition: none;
  }

  .portfolio .portfolio-content:hover img,
  .portfolio .portfolio-content:focus-within img,
  .portfolio .portfolio-content.is-open img {
    transform: none;
  }
}

/* Details page: slider bullets (theme 15% grey is under 3:1, active accent is about 2.2:1) */
.portfolio-details .portfolio-details-slider .swiper-pagination .swiper-pagination-bullet {
  margin: 0 8px;
  background-color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.portfolio-details .portfolio-details-slider .swiper-pagination .swiper-pagination-bullet-active {
  background-color: var(--accent-text-color);
}

.portfolio-details .portfolio-details-slider .swiper-pagination .swiper-pagination-bullet:focus-visible {
  outline: 2px solid var(--default-color);
  outline-offset: 3px;
}

.portfolio-details .portfolio-details-slider img {
  height: auto;
}

/* Theme text at 70% opacity is about 3.9:1; use the body text colour */
.portfolio-details .portfolio-description p,
.portfolio-details .portfolio-description li {
  color: var(--default-color);
}

/* Info heading is an h2 (heading order after the page h1); the theme styles h3 */
.portfolio-details .portfolio-info h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
}

.portfolio-details .portfolio-info h2,
.portfolio-details .portfolio-description h2,
.portfolio-details .portfolio-info li {
  overflow-wrap: anywhere;
}

.portfolio-details .portfolio-info a,
.portfolio-details .portfolio-description a {
  color: var(--accent-text-color);
  text-decoration: underline;
}

.portfolio-details .portfolio-info a:hover,
.portfolio-details .portfolio-description a:hover {
  color: var(--heading-color);
}

.portfolio-details .portfolio-info a:focus-visible,
.portfolio-details .portfolio-description a:focus-visible {
  outline: 2px solid var(--accent-text-color);
  outline-offset: 2px;
}

/*----------------------------------------*/
/*  09. FAQ
/*----------------------------------------*/
/* The theme's .faq-content is a one-row grid (0fr -> 1fr); .faq-answer is the collapsing child */
.faq .faq-container .faq-item .faq-answer {
  overflow: hidden;
  min-height: 0;
}

.faq .faq-container .faq-item .faq-answer > :last-child {
  margin-bottom: 0;
}

.faq .faq-container .faq-item .faq-answer ul,
.faq .faq-container .faq-item .faq-answer ol {
  padding-left: 20px;
}

.faq .faq-container .faq-item .faq-answer a {
  color: var(--accent-text-color);
  text-decoration: underline;
}

.faq .faq-container .faq-item .faq-answer a:hover {
  color: var(--heading-color);
}

/* The question is a real button inside the h3 (accordion pattern) */
.faq .faq-container .faq-item h3 button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 24px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  overflow-wrap: anywhere;
}

.faq .faq-container .faq-item h3 button:focus-visible {
  outline: 2px solid var(--accent-text-color);
  outline-offset: 4px;
}

/* Keep "1." together when a long question wraps */
.faq .faq-container .faq-item h3 .num {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Accent teal on white is about 2.2:1; darken the open/hover question, number and chevron */
.faq .faq-container .faq-item h3 .num,
.faq .faq-container .faq-item h3:hover,
.faq .faq-container .faq-active h3,
.faq .faq-container .faq-item .faq-toggle:hover,
.faq .faq-container .faq-active .faq-toggle {
  color: var(--accent-text-color);
}

@media (prefers-reduced-motion: reduce) {
  .faq .faq-container .faq-item h3,
  .faq .faq-container .faq-item .faq-content,
  .faq .faq-container .faq-item .faq-toggle {
    transition: none;
  }
}

/* 09. FAQ: QA fixes */
/* Section title is an h2 (heading order); the theme styles .faq .content h3, so repeat its rules. */
.faq .content h2 {
  font-weight: 400;
  font-size: 34px;
}

/* Theme intro text at 70% opacity measured 3.43:1; use full body colour. */
.faq .content p {
  color: var(--default-color);
}

/*----------------------------------------*/
/*  10. Contact
/*----------------------------------------*/
/* The deployed theme already styles .info-item h3 (it has no h4 rule to change). Long
   Bulgarian words and addresses must wrap. */
.contact .info-item h3,
.contact .info-item p {
  overflow-wrap: anywhere;
}

/* Map: no iframe (and no Google request) until the visitor clicks; reserve its height */
.contact .contact-map {
  min-height: 270px;
}

.contact .contact-map iframe {
  border: 0;
  width: 100%;
  height: 270px;
  display: block;
}

.contact .contact-map-placeholder {
  height: 270px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface-color);
  border: 1px solid #8a8a8a;
}

.contact .contact-map-placeholder p {
  max-width: 560px;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

/* White on the theme accent is 2.2:1; use the darkened accent (about 6:1 with white) */
.contact .contact-map-load,
.contact .php-email-form button[type="submit"] {
  background: var(--accent-text-color);
  color: var(--contrast-color);
  min-height: 44px;
  cursor: pointer;
}

.contact .contact-map-load {
  border: 0;
  border-radius: 4px;
  padding: 10px 30px;
  transition: 0.4s;
}

.contact .contact-map-load:hover,
.contact .php-email-form button[type="submit"]:hover {
  background: var(--heading-color);
}

.contact .php-email-form button[type="submit"][disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Honeypot: off-screen rather than display:none (some bots skip hidden fields) */
.contact .contact-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Placeholders are the only visible labels: the theme's grey at 30% is far below 4.5:1 */
.contact .php-email-form input[type=text]::placeholder,
.contact .php-email-form input[type=email]::placeholder,
.contact .php-email-form textarea::placeholder {
  color: #6a6a6a;
  opacity: 1;
}

/* Theme field border is about 1.3:1; field boundaries need 3:1 (WCAG 1.4.11) */
.contact .php-email-form input[type=text],
.contact .php-email-form input[type=email],
.contact .php-email-form textarea {
  border-color: #8a8a8a;
}

.contact .php-email-form input[type=text]:focus,
.contact .php-email-form input[type=email]:focus,
.contact .php-email-form textarea:focus {
  border-color: var(--heading-color);
}

.contact .contact-field-error {
  color: #b02a37;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  margin-top: 4px;
}

.contact .php-email-form .form-control[aria-invalid="true"] {
  border-color: #b02a37;
}

/* Turnstile: reserve its height so the form does not jump; the widget is 300px wide */
.contact .contact-turnstile {
  min-height: 65px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

@media (max-width: 340px) {
  .contact .contact-turnstile {
    transform: scale(0.9);
    transform-origin: center top;
  }
}

/* Status: the form state class shows the theme's message boxes */
.contact .contact-status:focus {
  outline: none;
}

.contact .contact-status:focus-visible {
  outline: 3px solid var(--heading-color);
  outline-offset: 2px;
}

.contact .contact-form.is-loading .loading,
.contact .contact-form.is-error .error-message,
.contact .contact-form.is-success .sent-message {
  display: block;
}

/* Theme white on #059652 and #df1529 are below 4.5:1 for 16px text; darken them */
.contact .php-email-form .sent-message {
  background: #0b6b3a;
}

.contact .php-email-form .error-message {
  background: #b02a37;
}

.contact .contact-privacy {
  font-size: 13px;
  margin: 12px 0 0;
  color: var(--default-color);
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .contact .php-email-form .loading:before {
    animation: none;
  }
  .contact .contact-map-load,
  .contact .php-email-form button[type="submit"] {
    transition: none;
  }
}

/* 10. Contact: QA fixes */
/* Phone and email links: accent on white is 2.27:1; darkened accent plus underline */
.contact .info-item a {
  color: var(--accent-text-color);
  text-decoration: underline;
}

.contact .info-item a:hover {
  color: var(--heading-color);
}

/* Persistent visible labels (placeholders vanish on typing); * marks required fields */
.contact .contact-label {
  display: block;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--heading-color);
  margin-bottom: 4px;
}

.contact .contact-required {
  color: #b02a37;
}

/*----------------------------------------*/
/*  11. Polish: accessibility and 404
/*----------------------------------------*/

/* Footer: white on #30ac9d is 2.79:1; a darker teal gives 5.3:1 */
.footer.dark-background {
  --background-color: color-mix(in srgb, #30ac9d, #000 30%);
}

/* Footer column titles are h3 (heading order after the page h2s); the theme styles h4 */
.footer h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
}

/* Social links: icon and ring need 3:1 on the dark teal */
.footer .social-links a {
  color: var(--contrast-color);
  border-color: var(--contrast-color);
}

.footer .social-links a:hover {
  color: var(--contrast-color);
  background-color: color-mix(in srgb, var(--contrast-color), transparent 80%);
  border-color: var(--contrast-color);
}

.footer .icon {
  color: var(--contrast-color);
}

/* Service cards: the icon glyph (z-index 2) sat above the stretched link and swallowed clicks */
.services .service-item .icon i {
  pointer-events: none;
}

.services .service-item:hover .icon {
  background-color: var(--services-accent);
}

/* Carousel pause / play button (created by site.js) */
.clients .init-swiper,
.portfolio-details .init-swiper {
  position: relative;
}

.carousel-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 11;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--accent-text-color);
  border-radius: 50%;
  background: var(--surface-color);
  color: var(--accent-text-color);
  font-size: 22px;
  line-height: 0;
  cursor: pointer;
}

.carousel-toggle:hover {
  background: var(--accent-text-color);
  color: var(--contrast-color);
}

/* Keep the bullets clear of the button on narrow screens */
.clients .swiper-pagination {
  padding-right: 56px;
  padding-left: 56px;
}

/* 404 page: .cta-btn is only styled inside .call-to-action, so build the same look on a light background */
.not-found-btn {
  display: inline-block;
  min-height: 44px;
  padding: 12px 40px;
  border: 2px solid var(--accent-text-color);
  border-radius: 5px;
  background: var(--accent-text-color);
  color: var(--contrast-color);
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 1px;
  text-decoration: none;
  transition: 0.5s;
}

.not-found-btn:hover,
.not-found-btn:focus-visible {
  background: var(--heading-color);
  border-color: var(--heading-color);
  color: var(--contrast-color);
}

/* Contact: "* required field" note above the fields (default text colour is 7.5:1 on white) */
.contact .contact-required-note {
  margin: 0 0 12px;
  font-size: 14px;
  text-align: left;
  color: var(--default-color);
}

@media (prefers-reduced-motion: reduce) {
  .not-found-btn {
    transition: none;
  }
}

/* Scroll-to-top: white arrow on the accent is 2.2:1 (needs 3:1); darker fill plus a light edge so it stays visible over the dark footer */
.scroll-top {
  background-color: var(--accent-text-color);
  border: 1px solid color-mix(in srgb, var(--contrast-color), transparent 30%);
}

.scroll-top:hover {
  background-color: var(--heading-color);
}

/* Form fields: the theme removes the outline on focus; keep a ring (3:1) next to the darker border */
.contact .php-email-form input[type=text]:focus-visible,
.contact .php-email-form input[type=email]:focus-visible,
.contact .php-email-form textarea:focus-visible {
  outline: 3px solid var(--heading-color);
  outline-offset: 2px;
  border-color: var(--heading-color);
}

/* Phones: the fixed scroll-to-top button (40px + 15px) must not cover the last footer line */
@media (max-width: 575px) {
  .footer {
    padding-bottom: 56px;
  }
}
