/* Targeted functional fixes only. Native Aigocy composition, typography,
   spacings, button materials and mobile hero remain in styles.css. */

/* Reveal the vendor dropdown with keyboard/touch, using its hover state.
   Escape must also dismiss it while the pointer still rests on the trigger. */
body.aigocy-page .nav-menu-main .menu-item.is-open .sub-menu {
  pointer-events: all;
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
body.aigocy-page .nav-menu-main .menu-item.is-dismissed .sub-menu {
  pointer-events: none;
  transform: translateY(10px);
  opacity: 0;
  visibility: hidden;
}
/* Native mobile submenus gain comfortable hit areas. The centre alone scrolls
   when expanded links exceed a short screen, keeping the header/footer usable. */
body.aigocy-page .offcanvas-menu .sub-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
body.aigocy-page .offcanvas-menu .canvas_center {
  min-height: 0;
  justify-content: flex-start;
  justify-content: safe center;
  overscroll-behavior: contain;
}
body.aigocy-page .offcanvas-menu :is(.canvas_head, .canvas_foot) {
  flex-shrink: 0;
}
body.aigocy-page .offcanvas-menu .close-mb-menu {
  min-height: 44px;
}

/* The native form styles target an explicit input type. Keep the same
   underlined treatment for the name field, email and native select alike. */
html body.aigocy-page .section-contact .form-contact fieldset {
  min-width: 0;
}
html body.aigocy-page .section-contact .form-contact fieldset > label {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
}
html body.aigocy-page .section-contact .form-contact :is(input:not([type]), input[type="text"], input[type="email"], select, textarea) {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--neutral-300);
  border-radius: 0;
  background-color: transparent;
  color: var(--primary);
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
}
html body.aigocy-page .section-contact .form-contact :is(input, textarea)::placeholder {
  color: var(--secondary);
  opacity: 1;
}
html body.aigocy-page .section-contact .form-contact select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
html body.aigocy-page .section-contact .form-contact select option {
  color: var(--primary);
  background-color: var(--neutral-100);
}
html body.aigocy-page .section-contact .form-contact textarea {
  height: 128px;
  min-height: 128px;
  resize: vertical;
}
html body.aigocy-page .section-contact .form-contact :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-bottom-color: var(--brand);
}
@media (forced-colors: active) {
  html body.aigocy-page .section-contact .form-contact select {
    appearance: auto;
    background-image: none;
  }
}

/* The purchased project-page carousel uses square photography. Reserve that
   same frame for our mixed source ratios, including the text-only slide. */
body.aigocy-page .testimonials-v2-wrap .col-right {
  min-width: 0;
}
body.aigocy-page .testimonials-v2-wrap .testimonial-image-v2 {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 24px;
}
body.aigocy-page .testimonials-v2-wrap .testimonial-image-v2 > img,
body.aigocy-page .testimonials-v2-wrap .testimonial-image-v2 > .swiss-review-monogram {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
body.aigocy-page .testimonials-v2-wrap .testimonial-image-v2 > img[src$="2s-building.webp"] {
  object-position: center top;
}
body.aigocy-page .testimonials-v2-wrap .testimonial-image-v2 > .swiss-review-monogram {
  display: flex;
  padding: 20px;
  text-align: center;
}
body.aigocy-page .testimonials-v2-wrap .swiss-review-monogram > span {
  font-size: clamp(64px, 10vw, 130px);
}

/* The original mobile project link remains visible on touch tablets too.
   Reuse the vendor's top-left placement and translucent material. */
@media (min-width: 768px) and (hover: none), (min-width: 768px) and (pointer: coarse) {
  body.aigocy-page .featured-works-item .image .view-project {
    top: 15px !important;
    left: 15px !important;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    max-width: calc(100% - 30px);
  }
}

/* At tablet width the French CTA is longer than the vendor's two-word label.
   Keep both prices and buttons readable before the full desktop row returns. */
body.aigocy-page .section-benefits .row > [class*="col-"] > .overflow-hidden {
  width: 100%;
  min-width: 0;
}
@media (min-width: 768px) and (max-width: 1199px) {
  body.aigocy-page .section-pricing .pricing-item {
    padding: 32px 28px 36px;
  }
  body.aigocy-page .section-pricing .pricing-item .heading {
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 24px;
  }
  body.aigocy-page .section-pricing .pricing-item .heading > .d-flex {
    flex: 0 0 auto;
    min-width: 0;
  }
  body.aigocy-page .section-pricing .pricing-item .heading .swiss-price-number {
    font-size: 56px;
    line-height: 60px;
  }
  body.aigocy-page .section-pricing .pricing-item .heading > .tf-btn {
    flex-shrink: 0;
    min-height: 48px;
    max-width: 100%;
    text-align: center;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  body.aigocy-page .section-pricing .pricing-item .heading {
    align-items: flex-start;
    flex-direction: column;
  }
  body.aigocy-page .section-pricing .pricing-item .heading > .tf-btn {
    align-self: stretch;
  }
  body.aigocy-page .section-pricing .pricing-item .content {
    flex-direction: column;
    gap: 20px;
  }
  body.aigocy-page .section-pricing .pricing-item .content > * {
    width: 100%;
  }
}

/* Align the statistics heading with its copy and the following reviews.
   The vendor's 4px optical offset becomes visible in the French layout. */
body.aigocy-page #depuis-2022 .heading-section {
  margin-left: 0;
}

/* Keep the native two blocks stacked through portrait-tablet widths, as the
   following testimonials already are. The desktop split returns at 992px. */
@media (min-width: 768px) and (max-width: 991px) {
  body.aigocy-page #depuis-2022 > .container > .row > .col-md-6 {
    flex: 0 0 100%;
    width: 100%;
  }
  body.aigocy-page #depuis-2022 > .line {
    display: none;
  }
  body.aigocy-page #depuis-2022 .statistic-slider {
    max-width: none;
    margin-left: 0;
  }
  body.aigocy-page #depuis-2022 .statistic-slider .text {
    min-height: 0;
    margin-bottom: 40px;
  }
}

/* 40vw with a fixed 150px line cropped the animated values at 600–767px.
   Bound their scale and let the line box follow it, keeping every slide. */
@media (max-width: 991px) {
  body.aigocy-page #depuis-2022 .swiper .statistic-number {
    font-size: clamp(112px, 36vw, 180px);
    line-height: 1.1;
    align-items: baseline;
  }
  body.aigocy-page #depuis-2022 .swiper [data-statistic]:not([data-statistic="revenue"]) .prefix {
    font-size: 1em;
  }
  body.aigocy-page #depuis-2022 .swiper [data-statistic="revenue"] .prefix {
    font-size: .55em;
  }
}

/* Add only the missing outer reading gutters. GSAP wraps fadeUp text in
   .overflow-hidden at runtime: move that wrapper once it exists, never both.
   Images, hero overlaps, containers and desktop column gaps stay native. */
@media (max-width: 767px) {
  body.aigocy-page :is(.section-services-single, .section-work-single) > .container > .row > [class*="col-"] > :is(h2, h3, h4, h5, h6, p, ul, .text-body-1, .list-tags, .tf-btn, .overflow-hidden:has(> :is(h2, h3, h4, h5, h6, p, ul, .text-body-1, .list-tags, .tf-btn))) {
    margin-left: 12px;
    margin-right: 12px;
  }
  body.aigocy-page .section-work-single > .container > .swiss-project-cta {
    margin-left: 12px;
    margin-right: 12px;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  body.aigocy-page :is(.section-services-single, .section-work-single) > .container > .row > [class*="col-"]:first-child > :is(h2, h3, h4, h5, h6, p, ul, .text-body-1, .list-tags, .tf-btn, .overflow-hidden:has(> :is(h2, h3, h4, h5, h6, p, ul, .text-body-1, .list-tags, .tf-btn))) {
    margin-left: 20px;
  }
  body.aigocy-page :is(.section-services-single, .section-work-single) > .container > .row > [class*="col-"]:last-child > :is(h2, h3, h4, h5, h6, p, ul, .text-body-1, .list-tags, .tf-btn, .overflow-hidden:has(> :is(h2, h3, h4, h5, h6, p, ul, .text-body-1, .list-tags, .tf-btn))) {
    margin-right: 20px;
  }
  /* The opening title follows an image in a separate full-width column. */
  body.aigocy-page .section-services-single > .container > .row > .col-12 > :is(.heading, .overflow-hidden:has(> .heading)) {
    margin-left: 20px;
    margin-right: 20px;
  }
  body.aigocy-page .section-work-single > .container > .swiss-project-cta {
    margin-left: 20px;
    margin-right: 20px;
  }
  /* The black wrapper already contributes 12px (16px from 992px).
     Add the remainder locally to keep both chapters on a 32px reading axis. */
  body.aigocy-page :is(#depuis-2022, #avis) > .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  body.aigocy-page :is(#depuis-2022, #avis) > .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}
