/* Decorative line icons. The text and accessible names come from the pages. */
@supports (mask-image: url("")) {
  .contact-grid .aside-card a:is([href^="tel:"], [href^="mailto:"], [href^="https://www.google.com/maps/dir/"]) {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding-inline-start: 1.7rem;
    overflow-wrap: anywhere;
  }

  .contact-grid a[href^="tel:"] {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3H4a1 1 0 0 0-1 1c0 9.4 7.6 17 17 17a1 1 0 0 0 1-1v-3l-5-2-2 2c-3-1.1-5.9-4-7-7l2-2z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .contact-grid a[href^="mailto:"] {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/g%3E%3C/svg%3E");
  }

  .contact-grid a[href^="https://www.google.com/maps/dir/"] {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M19 9c0 4.4-7 12-7 12S5 13.4 5 9a7 7 0 0 1 14 0Z'/%3E%3Ccircle cx='12' cy='9' r='2.3'/%3E%3C/g%3E%3C/svg%3E");
  }

  .contact-grid .aside-card a:is([href^="tel:"], [href^="mailto:"], [href^="https://www.google.com/maps/dir/"])::before {
    position: absolute;
    inset-block-start: .19em;
    inset-inline-start: 0;
    width: 1.15em;
    height: 1.15em;
  }

  .service-list {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7V4h8v3M3 12h18'/%3E%3C/g%3E%3C/svg%3E");
  }

  .service-row .row-number { display: none; }
  .service-row .row-text { align-self: start; }

  .service-row::before {
    width: 1.55rem;
    height: 1.55rem;
    align-self: start;
    margin-top: .12rem;
  }

  .service-row:is([href$="/geotecnica-estrutural/"], [href$="/geotecnica-estructural/"], [href$="/geotechnical-structural/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 19h20L13 5l-4 6-2-2-5 10Zm10-8 3 3m1-2 2-2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/ambiental/"], [href$="/environmental/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 12h4l3-7 4 14 3-7h6M3 3h18M3 21h18' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/ecologica/"], [href$="/ecological/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 18c-2-4 0-7 5-9 4-1 7-2 10-5 1 10-3 16-10 16-2 0-4-1-5-2Zm-2 3 11-8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/integrada-websig/"], [href$="/integrated-webgis/"], [href$="/sig-websig/"], [href$="/gis-webgis/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 7 9-4 9 4-9 4-9-4Zm0 5 9 4 9-4M3 17l9 4 9-4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/topografia-cadastro/"], [href$="/topografia-catastro/"], [href$="/surveying-cadastre/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Cpath d='M12 2v6m0 8v6M2 12h6m8 0h6'/%3E%3C/g%3E%3C/svg%3E");
  }

  .service-row:is([href$="/fotogrametria-lidar-3d/"], [href$="/photogrammetry-lidar-3d/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h4l2-3h4l2 3h4a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Z'/%3E%3Ccircle cx='12' cy='13' r='3.2'/%3E%3C/g%3E%3C/svg%3E");
  }

  .service-row:is([href$="/batimetria/"], [href$="/bathymetry/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6c2.2 0 2.8-2 5-2s2.8 2 5 2 2.8-2 5-2 2.8 2 5 2M4 11h16m-13 4h10m-7 4h4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/pedreiras-minas/"], [href$="/canteras-minas/"], [href$="/quarries-mines/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 19h18M4 19v-4h5v-4h5V7h6M4 9l4-4 3 3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/geologia-geotecnia/"], [href$="/geology-geotechnics/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9 8 4l5 2 5-1 3 4v10H3V9Zm0 3 6-3 6 3 6-2M3 16l6-3 6 3 6-2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/ambiente-licenciamento/"], [href$="/medio-ambiente-autorizaciones/"], [href$="/environmental-permitting/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h8l4 4v14H6V3Zm8 0v5h4M9 15l2 2 4-4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/aguas-qualidade-ambiental/"], [href$="/aguas-calidad-ambiental/"], [href$="/water-environmental-quality/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3c-3 4.4-6 7.5-6 11a6 6 0 0 0 12 0c0-3.5-3-6.6-6-11Zm-2.8 11.5c.2 1.4.9 2.2 2.3 2.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/desmonte-rocha-demolicao/"], [href$="/arranque-roca-demolicion/"], [href$="/rock-excavation-demolition/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 9 5-5 5 1 4-1 4 5v10H3V9Zm10-4-3 6 4 2-3 6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .service-row:is([href$="/formacao-tecnica/"], [href$="/formacion-tecnica/"], [href$="/technical-training/"]) {
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m2 9 10-5 10 5-10 5-10-5Zm4 2v5c3 4 9 4 12 0v-5m4-2v7' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .project-image {
    position: relative;
    cursor: zoom-in;
    --section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='m15 15 5 5m-13-9.5h7m-3.5-3.5v7'/%3E%3C/g%3E%3C/svg%3E");
  }

  .project-image::before, .project-image::after {
    position: absolute;
    content: "";
    pointer-events: none;
  }

  /* The archive photos have their logo and contact details in the other corners. */
  .project-image::before {
    inset-inline-start: .7rem;
    inset-block-end: .7rem;
    width: 2.1rem;
    height: 2.1rem;
    background-color: var(--accent);
    border: 1px solid var(--ink);
    border-radius: .4rem;
  }

  .project-image::after {
    inset-inline-start: 1.12rem;
    inset-block-end: 1.12rem;
    width: 1.26rem;
    height: 1.26rem;
    background-color: var(--ink);
  }

  .project-image:hover::before, .project-image:focus-visible::before {
    background-color: var(--accent-light);
  }

  .contact-grid .aside-card a:is([href^="tel:"], [href^="mailto:"], [href^="https://www.google.com/maps/dir/"])::before,
  .service-row::before {
    content: "";
    display: block;
    background-color: var(--green-dark);
  }

  .contact-grid .aside-card a:is([href^="tel:"], [href^="mailto:"], [href^="https://www.google.com/maps/dir/"])::before,
  .service-row::before, .project-image::after {
    mask: var(--section-icon) center / contain no-repeat;
  }

  @media (forced-colors: active) {
    .contact-grid .aside-card a:is([href^="tel:"], [href^="mailto:"], [href^="https://www.google.com/maps/dir/"])::before,
    .service-row::before, .project-image::after {
      forced-color-adjust: none;
      background-color: CanvasText;
    }
  }
}
