/* =========================================
   1. VARIÁVEIS GLOBAIS (:root)
   ========================================= */
:root {
  /* Cores */
  --color-dark: #072b31;
  --color-light: #e6eee1;
  --color-accent: #7b9a67;
  --color-accent-light: #d3fe8a;
  --color-teal: #2f5854;
  --color-gray: #d9d9d9;
  --color-gray-transp: #d9d9d94d;
  --color-white: #ffffff;
  --color-black: #000000;

  /* Se você tiver as vars --lf-primary no HTML, elas continuam funcionando */

  /* Fontes (Facilita a troca futura e uso de fallbacks) */
  --font-aeonik-light: "Aeonik Light", sans-serif;
  --font-aeonik-regular: "Aeonik Regular", sans-serif;
  --font-aeonik-bold: "Aeonik Bold", sans-serif;
  --font-fono-light: "Aeonik Fono Light", monospace;
  --font-fono-regular: "Aeonik Fono Regular", monospace;
  --font-fono-bold: "Aeonik Fono Bold", monospace;
  --font-feature-regular: "Feature Deck Regular", sans-serif;
  --font-feature-bold: "Feature Deck Bold", sans-serif;
  --font-feature-bolder: "Feature Deck Bolder", sans-serif;

  --max-content-width: 1320px;
}

/* =========================================
   2. FONTES (Com font-display: swap)
   ========================================= */
@font-face {
  font-family: "Aeonik Regular";
  src: url("fonts/aeonik/Aeonik-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Light";
  src: url("fonts/aeonik/Aeonik-Thin.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Bold";
  src: url("fonts/aeonik/Aeonik-Bold.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Fono Light";
  src: url("fonts/aeonik-fono/AeonikFono-Light.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Fono Regular";
  src: url("fonts/aeonik-fono/AeonikFono-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Fono Bold";
  src: url("fonts/aeonik-fono/AeonikFono-Bold.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Feature Deck Regular";
  src: url("fonts/feature/FeatureDeckCondensed-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Feature Deck Bold";
  src: url("fonts/feature/FeatureDeckCondensed-Bold.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Feature Deck Bolder";
  src: url("fonts/feature/FeatureDeckCondensed-Extrabold.otf")
    format("opentype");
  font-weight: bolder;
  font-style: normal;
  font-display: swap;
}

/* =========================================
   3. RESET & CLASSES UTILITÁRIAS
   ========================================= */
#clinicas {
  p,
  h1,
  h2,
  .h2,
  h3,
  h4,
  h5,
  h6 {
    padding: 0;
    margin: 0;
    color: var(--color-dark);
  }

  .fit-content {
    width: fit-content;
  }
  .w-half {
    width: 50%;
  }
  .flex-1 {
    flex: 1;
  }
  .m-auto {
    margin: auto;
  }
  .p-0 {
    padding: 0;
  }
  .m-0 {
    margin: 0;
  }
  .mt-8 {
    margin-top: 32px;
  }
  .mb-6 {
    margin-bottom: 24px;
  }

  /* Flexbox Utilities */
  .row {
    display: flex;
    flex-direction: row;
  }
  .align-center {
    display: flex;
    align-items: center;
  }
  .relative {
    display: flex;
    position: relative;
  }
  .flex-end {
    display: flex;
    justify-content: flex-end;
  }
  .flex-start {
    display: flex;
    justify-content: flex-start;
  }

  /* Componentes Úteis */
  .text-container {
    width: 50%;
  }
  .desktop-only {
    display: block;
  }
  .mobile-only {
    display: none;
  }
  .top-border {
    border-top: 1px solid var(--color-black);
  }

  .left-rounded {
    border-radius: 100px 100px 0 100px; /* Simplificado via shorthand */
  }

  .right-rounded {
    border-radius: 100px 100px 100px 0;
  }

  .degrade {
    background: linear-gradient(
      to bottom,
      var(--color-light) 0px,
      var(--color-white) 2800px,
      var(--color-white) 100%
    );
  }

  /* Botões */
  .hi-btn {
    font-family: var(--font-aeonik-regular);
    font-weight: 400;
    font-size: 16px;
    background-color: var(--lf-primary);
    color: var(--lf-white) !important;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 210px;
    margin: 24px auto 0 auto;
    box-shadow: 1px 1px 9px rgba(0, 0, 0, 0.25);
  }

  .hi-btn:hover,
  .hi-btn:focus-visible {
    /* Adicionado foco para acessibilidade */
    background-color: var(--lf-primary-hover);
    outline: 2px solid var(--color-dark);
    outline-offset: 2px;
  }

  .hi-btn img {
    font-size: 18px;
    margin-left: 8px;
  }

  /* =========================================
   4. SEÇÕES PRINCIPAIS
   ========================================= */

  #clinicas {
    background-color: var(--color-light);
  }

  /* --- Clin 01 --- */
  .clin-01 {
    margin-top: 69px;
    background-size: cover !important;
    padding: 42px;
  }

  .content {
    max-width: var(--max-content-width);
    margin: 0 auto;
  }

  .clin-01 h1 {
    max-width: 50%;
    margin: 48px 0;
    font-family: var(--font-feature-regular);
    font-weight: 700;
    font-size: 70px;
    line-height: 76px;
    letter-spacing: 0.5px;
    color: var(--color-dark);
  }

  .clin-01 p {
    max-width: 45%;
    font-family: var(--font-aeonik-regular);
    font-weight: 400;
    font-size: 22px;
    line-height: 32px;
    letter-spacing: 0.5px;
    color: var(--color-dark);
  }

  /* --- Clin 02 --- */
  .clin-02 .content {
    gap: 48px;
    padding: 8rem 42px 0 42px;
  }

  .clin-02-content {
    display: flex;
    flex-direction: column;
  }

  .clin-02-row {
    display: flex;
    flex-direction: row;
  }

  .clin-02-left-content {
    border-bottom: 1px solid var(--color-black);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 50%;
    max-width: 50%;
  }

  .clin-02-left-content h2 {
    font-family: var(--font-aeonik-regular);
    font-size: 48px;
    line-height: 1; /* Simplificado de 48px para 1 (100%) */
    text-transform: uppercase;
  }

  .clin-02-left-content p {
    font-family: var(--font-aeonik-regular);
    font-weight: 400;
    font-size: 22px;
    line-height: 32px;
    letter-spacing: 0.5px;
  }

  .clin-02 .ghost {
    width: 50%;
    height: 8rem;
    border-right: 1px solid var(--color-black);
  }

  .clin-02-right-content {
    padding: 32px;
    border-bottom: 1px solid var(--color-black);
    width: 50%;
    max-width: 50%;
  }

  .clin-02-right-content h3 {
    font-family: var(--font-aeonik-bold);
    font-size: 32px;
    line-height: 48px;
    padding: 12px 16px 0 16px;
    display: inline;
    background: linear-gradient(
      to top,
      var(--color-accent-light) 100%,
      transparent 60%
    );
  }

  .clin-02-right-content p {
    margin-top: 16px;
    font-family: var(--font-aeonik-regular);
    font-size: 22px;
    line-height: 32px;
    letter-spacing: 0.5px;
  }

  /* --- Clin 03 --- */
  .clin-03 {
    background-color: var(--color-dark);
    padding: 0 42px 8rem 42px;
    position: relative;
  }

  .clin-03 .ghost {
    width: 50%;
    height: 8rem;
    border-right: 1px solid var(--color-accent);
    z-index: 0;
  }

  .clin-03 .number {
    z-index: 1;
    width: 8.1rem;
    height: 8.1rem;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: var(--color-light);
    font-family: var(--font-fono-light);
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .clin-03 h2 {
    font-family: var(--font-feature-regular);
    font-size: 64px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    color: var(--color-light);
    z-index: 1;
    position: relative;
    max-width: 50%;
  }

  .clin-03-content {
    display: flex;
    flex-direction: column;
    margin: 2rem 4rem;
    gap: 3rem;
  }

  .clin-03-content .row {
    align-items: center;
  }
  .clin-03 .anchor-left {
    text-align: right;
  }
  .clin-03 .anchor-right {
    text-align: left;
  }

  .clin-03 h4 {
    padding: 8px 7rem;
    background-color: var(--color-light);
    font-family: var(--font-aeonik-bold);
    font-size: 24px;
    line-height: 32px;
    text-transform: uppercase;
  }

  .clin-03 p {
    padding: 8px 7rem;
    font-family: var(--font-aeonik-regular);
    font-size: 22px;
    line-height: 32px;
    color: var(--color-light);
  }

  .clin-03 .background-prop {
    position: absolute;
    width: 8px;
    height: 75%;
    background-color: var(--color-accent);
    top: 6%;
    left: calc(50% - 4px);
    z-index: 0;
  }

  /* --- Clin 04 & 05 --- */
  .clin-04 {
    padding: 8rem 4rem;
  }
  .clin-04 h2 {
    font-family: var(--font-feature-regular);
    font-size: 64px;
    line-height: 76px;
    text-align: center;
  }
  .clin-04 .carousel-container {
    margin-top: 8rem;
  }

  .clin-05 {
    padding: 1rem 2.5rem;
  }
  .clin-05 .content {
    display: flex;
    flex-direction: row;
  }

  .clin-05 .left-card {
    background-color: var(--color-teal);
    border-radius: 94px 0 0 94px;
    padding: 8rem 5rem;
    width: 50%;
    max-width: 50%;
    display: flex;
  }

  .clin-05 .left-card h2 {
    font-family: var(--font-feature-regular);
    font-weight: 400;
    font-size: 84px;
    line-height: 1.2;
    color: var(--color-light);
    text-decoration: underline solid var(--color-dark) 3px;
    text-underline-offset: 8px;
    margin: auto;
  }

  .clin-05 .right-card {
    justify-content: space-around;
    background-color: var(--color-dark);
    padding: 3rem 8rem 3rem 4rem;
    border-radius: 0 94px 94px 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 50%;
    max-width: 50%;
  }

  .clin-05 .right-card h3 {
    color: var(--color-light);
    font-family: var(--font-aeonik-bold);
    font-size: 32px;
    font-weight: 600;
  }

  .clin-05 .right-card p {
    font-family: var(--font-aeonik-regular);
    font-size: 22px;
    color: var(--color-light);
  }

  .clin-05 .right-card .anvisa {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
  }

  .clin-05 .right-card .anvisa p {
    font-family: var(--font-aeonik-regular);
    font-weight: 700;
    text-transform: uppercase;
  }

  /* --- Clin 06 & 07 --- */
  .clin-06 h2 {
    font-family: var(--font-feature-regular);
    font-weight: 400;
    font-size: 70px;
    line-height: 1.2;
    margin: 5rem 2rem;
  }

  .clin-06 h2 b {
    font-weight: 600;
  }
  .clin-06 img {
    width: 100%;
  } /* Fallback mais seguro que -webkit-fill-available para imagens */

  .clin-07 {
    margin-top: 8rem;
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
  }

  .clin-07 .divider {
    border-bottom: 1px solid var(--color-black);
    width: 50%;
    margin: auto;
  }

  .clin-07 .content {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }

  .clin-07 .first-item,
  .clin-07 .second-item,
  .clin-07 .third-item,
  .clin-07 .fourth-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    max-width: 50%;
    width: 50%;
  }

  .clin-07 .first-item,
  .clin-07 .second-item,
  .clin-07 .third-item {
    padding: 4rem 0;
  }

  .clin-07 .third-item,
  .clin-07 .fourth-item {
    background-color: var(--color-gray-transp);
  }

  .clin-07 .fourth-item > div {
    background-color: var(--color-gray);
    border-bottom-left-radius: 87px;
    height: 100%;
    width: 100%;
    margin: auto;
    justify-content: center;
  }

  .clin-07 h3 {
    width: fit-content;
    font-family: var(--font-aeonik-light);
    font-weight: 300;
    font-size: 12rem;
    line-height: 0.8;
    color: var(--color-black);
  }

  .clin-07 h3 span {
    font-size: 8rem;
    display: inline-block;
    vertical-align: super;
  }

  .clin-07 p {
    width: fit-content;
    font-family: var(--font-aeonik-light);
    font-weight: 300;
    font-size: 32px;
    padding-left: 1rem;
    color: var(--color-black);
    text-transform: uppercase;
  }

  .clin-07 .image-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding-left: 1rem;
  }

  .clin-07 .image-container p {
    font-size: 24px;
    text-transform: uppercase;
  }

  .clin-07 .footer {
    border-top: 1px solid var(--color-black);
    border-bottom: 1px solid var(--color-black);
  }

  .clin-07 .footer p {
    font-family: var(--font-aeonik-regular);
    font-size: 24px;
    padding: 1rem 0;
    color: gray;
    text-align: center;
    width: 100%;
  }

  /* --- Clin 08 & 09 --- */
  .clin-08 {
    padding: 10rem 2rem;
    display: flex;
    background-color: var(--color-white);
  }

  .clin-08 .content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
  }

  .clin-08 img {
    width: 100%;
    transition: transform 0.3s ease;
  }
  .clin-08 img:hover {
    transform: scale(1.01);
  }
  .clin-08 img:active {
    transform: scale(0.99);
    transition: transform 0.1s ease;
  }

  .clin-09 {
    background-color: var(--color-white);
  }
  .clin-09 .content {
    background-size: cover !important;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    display: flex;
  }

  .clin-09 .content .h2 {
    font-family: var(--font-feature-regular) !important;
    font-size: 92px;
    font-weight: 400;
    line-height: 1.2;
    max-width: 50%;
    text-align: start;
    margin: 4rem 0 0 3rem;
  }

  .clin-09 .content .h2 b {
    font-weight: 600;
  }
  .clin-09 .content .lf-card,
  .clin-09 .content .lf-container {
    margin: 0 0 0 auto;
  }

  /* =========================================
   5. CARROSSEL
   ========================================= */
  .carousel-container {
    position: relative;
    margin: auto;
    width: 100%;
    height: 30vw;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: pan-y;
  }

  .carousel-track:active {
    cursor: grabbing;
  }

  .card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(20vw, 264px);
    height: min(27vw, 356.4px);
    border-radius: 12px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    cursor: pointer;
    user-select: none;
    transition:
      transform 0.4s ease-in-out,
      background-color 0.4s ease,
      opacity 0.4s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 0;
  }

  .card.no-transition {
    transition: none !important;
  }

  .card h3 {
    color: var(--color-accent-light);
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .card p {
    font-family: var(--font-aeonik-bold);
    font-size: 1rem;
    color: var(--color-light);
  }

  /* Posições */
  .card-center {
    transform: translate(-50%, -50%) scale(1);
    z-index: 3;
    background-color: #0f1c1f;
    opacity: 1;
    pointer-events: auto;
  }
  .card-left-1 {
    transform: translate(calc(-50% - min(10vw, 132px)), -50%) scale(0.85);
    z-index: 2;
    background-color: #48565a;
    opacity: 1;
    pointer-events: auto;
  }
  .card-right-1 {
    transform: translate(calc(-50% + min(10vw, 132px)), -50%) scale(0.85);
    z-index: 2;
    background-color: #48565a;
    opacity: 1;
    pointer-events: auto;
  }
  .card-left-2 {
    transform: translate(calc(-50% - min(20vw, 264px)), -50%) scale(0.7);
    z-index: 1;
    background-color: #6c777b;
    opacity: 1;
    pointer-events: auto;
  }
  .card-right-2 {
    transform: translate(calc(-50% + min(20vw, 264px)), -50%) scale(0.7);
    z-index: 1;
    background-color: #6c777b;
    opacity: 1;
    pointer-events: auto;
  }
  .card-hidden-left {
    transform: translate(calc(-50% - min(30vw, 396px)), -50%) scale(0.5);
    opacity: 0;
  }
  .card-hidden-right {
    transform: translate(calc(-50% + min(30vw, 396px)), -50%) scale(0.5);
    opacity: 0;
  }

  /* Controles Carrossel */
  .nav-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 20px;
  }
  .nav-btn svg {
    width: 48px;
    height: 48px;
    fill: #0f1c1f;
    transition: transform 0.2s;
  }
  .nav-btn:hover svg,
  .nav-btn:focus-visible svg {
    transform: scale(1.2);
  }

  /* =========================================
   6. MEDIA QUERIES
   ========================================= */

  @media screen and (max-width: 1024px) {
    .clin-01 h1 {
      font-size: 48px;
      line-height: 56px;
      max-width: 55%;
    }
    .clin-01 p {
      font-size: 18px;
      line-height: 28px;
      max-width: 55%;
    }
    .clin-03-content {
      margin: 2rem 0 0 0;
      gap: 2rem;
    }
    .clin-03 h4 {
      padding: 8px 4.5rem;
      font-size: 18px;
    }
    .clin-03 p {
      padding: 8px 4.5rem;
      font-size: 16px;
    }
    .clin-03 .background-prop {
      left: calc(49% + 5px);
    }
    .clin-05 .left-card {
      padding: 4rem 2.5rem;
    }
    .clin-05 .left-card h2 {
      font-size: 48px;
    }
    .clin-05 .right-card h3 {
      font-size: 22px;
    }
    .clin-05 .right-card p {
      font-size: 16px;
    }
    .clin-07 h3 {
      font-size: 6rem;
    }
    .clin-07 h3 span {
      font-size: 4rem;
    }
    .clin-07 p {
      font-size: 18px;
    }
    .clin-07 .image-container p {
      font-size: 14px;
    }
    .clin-09 .content {
      flex-direction: column;
      gap: 2rem;
      padding: 4rem 2rem;
      border-radius: 0;
    }
    .clin-09 .content .h2 {
      font-size: 48px;
      text-align: center;
      max-width: 80%;
      margin: 0 auto;
    }
    .clin-09 .content .lf-card,
    .clin-09 .content .lf-container {
      margin: auto;
    }
    .card {
      width: min(26vw, 343.2px);
      height: min(36vw, 475.2px);
    }
  }

  @media screen and (max-width: 768px) {
    .desktop-only {
      display: none;
    }
    .mobile-only {
      display: block;
    }

    .clin-01 h1 {
      font-size: 36px;
      line-height: 40px;
      max-width: 80%;
    }
    .clin-01 p {
      font-size: 16px;
      line-height: 24px;
      max-width: 80%;
    }

    .clin-02-row {
      flex-direction: column;
    }
    .clin-02-left-content,
    .clin-02-right-content {
      width: 100%;
      max-width: 100%;
      border: none;
      text-align: center;
    }
    .clin-02-left-content p {
      margin-bottom: 2rem;
    }
    .clin-02 .content {
      padding: 4rem 16px 0 16px;
    }
    .clin-02 .ghost {
      width: 45px;
    }

    .border-bottom-gap {
      border: none;
      background-image: linear-gradient(
        to right,
        var(--color-black),
        var(--color-black)
      );
      background-position: 45px bottom;
      background-size: calc(100% - 45px) 1px;
      background-repeat: no-repeat;
      padding-bottom: 10px;
    }

    .clin-03 .ghost,
    .clin-03 .w-half {
      display: none;
    }
    .clin-03 .number {
      position: absolute;
      top: 0;
      left: 0;
      width: 4rem;
      height: 4rem;
      font-size: 24px;
      transform: none;
      margin: 0;
    }
    .clin-03 h2 {
      font-size: 32px;
      line-height: 40px;
      max-width: 100%;
      text-align: center;
      padding-top: 2rem;
    }
    .clin-03-content {
      margin: 2rem 0;
    }
    .clin-03 .anchor-left {
      text-align: left;
    }
    .clin-03 p,
    .clin-03 h4 {
      padding: 0 0 0 4rem;
      margin-left: 1rem;
    }
    .clin-03 .background-prop {
      left: 58px;
      top: 0;
    }

    .clin-04 {
      padding: 4rem 2rem;
      margin: 0 0 4rem 0;
    }
    .clin-04 h2 {
      font-size: 32px;
      line-height: 40px;
    }

    .clin-05 {
      padding: 2rem 0;
    }
    .clin-05 .content {
      flex-direction: column;
    }
    .clin-05 .left-card {
      width: 100%;
      max-width: 100%;
      padding: 4rem 2rem calc(94px + 2rem) 2rem;
      border-radius: 94px 94px 0 0;
    }
    .clin-05 .left-card h2 {
      font-size: 42px;
      text-align: center;
    }
    .clin-05 .right-card {
      margin-top: -94px;
      width: 100%;
      max-width: 100%;
      padding: 4rem 2rem;
      border-radius: 94px;
      text-align: center;
    }
    .clin-05 .right-card .anvisa {
      justify-content: center;
      margin-top: 3rem;
    }

    .clin-06 h2 {
      font-size: 36px;
      line-height: 40px;
    }

    .clin-07 .content {
      flex-direction: column;
    }
    .clin-07 .first-item,
    .clin-07 .second-item,
    .clin-07 .third-item,
    .clin-07 .fourth-item {
      max-width: 100%;
      width: 100%;
    }
    .clin-07 .first-item,
    .clin-07 .second-item,
    .clin-07 .third-item {
      padding: 3rem 0;
    }
    .clin-07 .fourth-item > div {
      padding: 3rem 0;
    }
    .clin-07 .footer p {
      font-size: 14px;
    }

    .clin-09 .content {
      padding: 2rem 0;
    }
    .clin-09 .content .lf-card {
      width: 100%;
      max-width: 100%;
    }
    .clin-09 .content .h2 {
      font-size: 32px;
      padding: 1rem 2rem;
      max-width: 100%;
    }

    .card {
      width: min(48vw, 632.4px);
      height: min(54vw, 711.6px);
    }
    .nav-btn svg {
      fill: var(--color-dark);
    }
  }

  @media screen and (max-width: 390px) {
    .card {
      width: min(71vw, 554.1px);
      height: min(87vw, 675.9px);
    }
    .nav-btn svg {
      display: none;
    }
  }
}
