/* MATH override CSS — built from pages/cases.html + components/header.js + cs-listing restyle. */
/* === BASE (from pages/cases.html) === */

    /* ===== FONT-FACE ===== */
    @font-face {
      font-family: 'Carbon';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Carbon/Carbon-Regular.otf') format('opentype');
      font-weight: 400;
      font-style: normal;
    }
    @font-face {
      font-family: 'Carbon';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Carbon/Carbon-Regular-Italic.otf') format('opentype');
      font-weight: 400;
      font-style: italic;
    }
    @font-face {
      font-family: 'Carbon';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Carbon/Carbon-Bold.otf') format('opentype');
      font-weight: 700;
      font-style: normal;
    }
    @font-face {
      font-family: 'Carbon';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Carbon/Carbon-Bold-Italic.otf') format('opentype');
      font-weight: 700;
      font-style: italic;
    }
    @font-face {
      font-family: 'Carbon';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Carbon/Carbon-Thin.otf') format('opentype');
      font-weight: 100;
      font-style: normal;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Regular.otf') format('opentype');
      font-weight: 400;
      font-style: normal;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Italic.otf') format('opentype');
      font-weight: 400;
      font-style: italic;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Medium.otf') format('opentype');
      font-weight: 500;
      font-style: normal;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Medium_Italic.otf') format('opentype');
      font-weight: 500;
      font-style: italic;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_SemiBold.otf') format('opentype');
      font-weight: 600;
      font-style: normal;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_SemiBold_Italic.otf') format('opentype');
      font-weight: 600;
      font-style: italic;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Bold.otf') format('opentype');
      font-weight: 700;
      font-style: normal;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Bold_Italic.otf') format('opentype');
      font-weight: 700;
      font-style: italic;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Black.otf') format('opentype');
      font-weight: 900;
      font-style: normal;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Light.otf') format('opentype');
      font-weight: 300;
      font-style: normal;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_ExtraLight.otf') format('opentype');
      font-weight: 200;
      font-style: normal;
    }
    @font-face {
      font-family: 'Halyard Display';
      src: url('https://math.group/hubfs/raw_assets/public/math-group/fonts/Halyard_Display/fonnts.com-Halyard_Display_Book.otf') format('opentype');
      font-weight: 450;
      font-style: normal;
    }

    /* ===== RESET & BASE ===== */
    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      font-family: 'Halyard Display', 'Segoe UI', sans-serif;
      color: #020202;
      background: #fff;
      -webkit-font-smoothing: antialiased;
    }
    a { text-decoration: none; color: inherit; }
    img { display: block; max-width: 100%; }
    ul { list-style: none; }

    /* ===== CSS VARIABLES ===== */
    :root {
      --color-black: #020202;
      --color-white: #f9f8f8;
      --color-blue: #1e22aa;
      --color-orange: #ff8f1c;
      --color-turquoise: #2cccd3;
      --color-gray1: #97999b;
      --color-gray2: #3c3d3e;
      --color-gray3: #eaebeb;
      --color-gray-dark: #1e1f1f;
    }

    /* ===== SECTION PADDING ===== */
    .section-padding { padding-top: 120px; padding-bottom: 120px; }

    /* ===== TYPOGRAPHY ===== */
    .label {
      font-family: 'Carbon', sans-serif;
      font-weight: 700;
      font-size: 16px;
      line-height: 1.2;
      letter-spacing: 0.05em;
    }
    .heading-xl { font-weight: 600; font-size: 48px; line-height: 1.2; }
    .heading-lg { font-weight: 600; font-size: 40px; line-height: 1.2; }
    .heading-md { font-weight: 500; font-size: 28px; line-height: 1.2; }
    .heading-sm { font-weight: 500; font-size: 20px; line-height: 1.2; }
    .body-lg { font-weight: 400; font-size: 20px; line-height: 1.4; }
    .body-md { font-weight: 400; font-size: 18px; line-height: 1.4; }
    .body-sm { font-weight: 400; font-size: 16px; line-height: 1.6; }
    .body-xs { font-weight: 400; font-size: 14px; line-height: 1.4; }

    /* ===== BUTTONS ===== */
    .btn-math {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      height: 56px;
      padding: 16px 41px;
      border-radius: 4px;
      font-family: 'Halyard Display', sans-serif;
      font-size: 20px;
      font-weight: 400;
      line-height: 1.2;
      cursor: pointer;
      transition: opacity 0.2s;
      white-space: nowrap;
      border: none;
    }
    .btn-math:hover { opacity: 0.85; }
    .btn-blue { background: var(--color-blue); color: var(--color-white); border: 1px solid var(--color-blue); }
    .btn-blue:hover { color: var(--color-white); }
    .btn-blue-outline { background: transparent; color: var(--color-blue); border: 1px solid var(--color-blue); }
    .btn-blue-outline:hover { color: var(--color-blue); }
    .btn-orange-outline { background: var(--color-white); color: var(--color-orange); border: 1px solid var(--color-orange); }
    .btn-orange-outline:hover { color: var(--color-orange); }
    .btn-orange-outline-transparent { background: transparent; color: var(--color-orange); border: 1px solid var(--color-orange); }
    .btn-orange-outline-transparent:hover { color: var(--color-orange); }
    .btn-turquoise { background: var(--color-turquoise); color: var(--color-white); border: 1px solid var(--color-turquoise); }
    .btn-turquoise:hover { color: var(--color-white); }
    .btn-turquoise-outline { background: transparent; color: var(--color-turquoise); border: 1px solid var(--color-turquoise); }
    .btn-turquoise-outline:hover { color: var(--color-turquoise); }
    .btn-header {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 48px;
      padding: 12px 22px;
      border-radius: 8px;
      border: 1px solid var(--color-orange);
      color: var(--color-orange);
      font-family: 'Halyard Display', sans-serif;
      font-size: 18px;
      cursor: pointer;
      transition: opacity 0.2s;
      white-space: nowrap;
      background: transparent;
    }
    .btn-header:hover { opacity: 0.85; color: var(--color-orange); }

    .arrow-icon { width: 10px; height: 10px; display: inline-block; }
    .arrow-icon-sm { width: 8px; height: 8px; }

    /* ===== BADGE ===== */
    .badge-math {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 22px;
      padding: 4px 10px 5px 10px;
      border-radius: 50px;
      font-family: 'Carbon', sans-serif;
      font-weight: 700;
      font-size: 14px;
      line-height: 1.2;
      white-space: nowrap;
    }
    .badge-gray { background: #efefef; color: var(--color-black); }
    .badge-turquoise-outline { background: transparent; border: 1px solid var(--color-turquoise); color: var(--color-turquoise); font-size: 13px; height: 20px; }
    .badge-blue-outline { background: transparent; border: 1px solid var(--color-blue); color: var(--color-blue); font-size: 13px; height: 20px; }
    .badge-orange-outline { background: transparent; border: 1px solid var(--color-orange); color: var(--color-orange); font-size: 13px; height: 20px; }

    /* ===== HEADER ===== */
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 80px;
      padding: 20px 0;
      background: rgba(2, 2, 2, 0.9);
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
    }
    .header-logo { height: 30px; width: auto; }
    .nav-math { display: flex; align-items: center; gap: 44px; list-style: none; margin: 0; padding: 0; }
    .nav-item {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--color-white);
      font-size: 18px;
      line-height: 1.2;
      cursor: pointer;
      white-space: nowrap;
    }
    .nav-item:hover { opacity: 0.8; color: var(--color-white); }
    .nav-chevron { width: 12px; height: 6px; }
    .hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
    .hamburger span { display: block; width: 24px; height: 2px; background: var(--color-white); border-radius: 2px; transition: 0.3s; }

    /* ===== PAGE HEADER (white bg, no hero image) ===== */
    .page-header {
      padding: 80px 0 40px;
    }
    .page-header-inner {
      display: flex;
      flex-direction: column;
      gap: 30px;
    }
    .page-header-label {
      font-family: 'Carbon', sans-serif;
      font-weight: 700;
      font-size: 14px;
      line-height: 1.2;
      letter-spacing: 0.05em;
      color: var(--color-gray2);
    }
    .page-header-title {
      font-weight: 600;
      font-size: 48px;
      line-height: 1.2;
      color: var(--color-gray2);
    }
    .page-header-subtitle {
      font-weight: 500;
      font-size: 28px;
      line-height: 1.2;
      color: var(--color-gray2);
    }

    /* ===== CASES CONTAINER (96px padding = 1248px content at 1440px) ===== */
    .cases-container {
      width: 100%;
      max-width: 1440px;
      margin: 0 auto;
      padding-left: 96px;
      padding-right: 96px;
    }

    /* ===== CASES BODY (wraps header + listing with unified gradient) ===== */
    .cases-body {
      background: radial-gradient(ellipse at center, #ffffff 70%, #f9f8f8 75%, #c8c9ca 87.5%, #97999b 100%);
      position: relative;
      overflow: hidden;
    }

    /* ===== CASES LISTING ===== */
    .cases-listing {
      position: relative;
      overflow: hidden;
    }
    .cases-listing-inner {
      display: flex;
      flex-direction: column;
      gap: 42px;
      position: relative;
      z-index: 1;
    }

    /* ===== FILTER SECTION ===== */
    .filter-section {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }
    .filter-header {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .filter-header-icon {
      width: 20px;
      height: 20px;
      color: var(--color-gray2);
    }
    .filter-header-label {
      font-family: 'Halyard Display', sans-serif;
      font-weight: 500;
      font-size: 20px;
      line-height: 1.2;
      color: var(--color-gray2);
    }

    /* ===== FILTER BAR ===== */
    .filter-bar {
      display: flex;
      gap: 24px;
      align-items: flex-end;
    }
    .filter-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
    }
    .filter-label {
      font-size: 16px;
      font-weight: 400;
      line-height: 1.4;
      color: var(--color-gray2);
    }
    .filter-input,
    .filter-select {
      width: 100%;
      height: 52px;
      padding: 0 16px;
      background: #fff;
      border: 1px solid var(--color-gray3);
      border-radius: 4px;
      box-shadow: 0px 4px 12px rgba(2, 2, 2, 0.12);
      font-family: 'Halyard Display', sans-serif;
      font-size: 16px;
      font-weight: 400;
      color: var(--color-gray2);
      outline: none;
      transition: border-color 0.2s;
      appearance: none;
      -webkit-appearance: none;
    }
    .filter-input:focus,
    .filter-select:focus { border-color: var(--color-blue); }
    .filter-input::placeholder { color: var(--color-gray1); }
    .filter-input-wrapper {
      position: relative;
    }
    .filter-input-wrapper .filter-input { padding-right: 44px; }
    .filter-search-icon {
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
      width: 20px;
      height: 20px;
      color: var(--color-gray1);
      pointer-events: none;
    }
    .filter-select-wrapper {
      position: relative;
    }
    .filter-select-wrapper::after {
      content: '';
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
      width: 10px;
      height: 6px;
      background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2397999b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-size: contain;
      pointer-events: none;
    }
    .filter-select { cursor: pointer; padding-right: 44px; }
    .filter-select option { color: var(--color-black); }

    /* ===== CASES GRID (flex, 3 cols) ===== */
    .cases-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 24px;
    }
    .cases-grid-item {
      width: calc((100% - 48px) / 3);
    }

    /* ===== CASE CARD ===== */
    .case-card {
      background: #fff;
      border: 1px solid var(--color-gray3);
      border-radius: 4px;
      box-shadow: 0px 4px 12px rgba(2, 2, 2, 0.12);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 100%;
    }
    .case-card-image {
      position: relative;
      height: 200px;
      overflow: hidden;
    }
    .case-card-image img { width: 100%; height: 100%; object-fit: cover; }
    .case-card-image .gradient-overlay {
      position: absolute;
      top: -1px;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(to right, #1e22aa, #2cccd3 50%, #ff8f1c);
      opacity: 0.35;
    }
    .case-card-body {
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 18px;
      flex: 1;
    }
    .case-badges { display: flex; gap: 10px; flex-wrap: wrap; }
    .case-card-title { font-weight: 500; font-size: 28px; line-height: 1.2; color: var(--color-gray2); min-height: 68px; display: flex; align-items: center; }
    .case-card-desc { font-size: 16px; line-height: 1.6; color: var(--color-gray2); }
    .case-results { display: flex; gap: 7px; }
    .case-result-item {
      flex: 1;
      background: var(--color-white);
      border-radius: 8px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      text-align: center;
    }
    .case-result-value { font-weight: 500; font-size: 20px; line-height: 1.2; color: var(--color-orange); white-space: nowrap; }
    .case-result-label { font-size: 16px; line-height: 1.6; color: var(--color-gray2); white-space: nowrap; }
    .case-card-footer { display: flex; flex-direction: column; gap: 24px; margin-top: auto; }
    .case-client { padding-top: 24px; border-top: 1px solid var(--color-gray3); }
    .case-cta { padding-top: 18px; border-top: 1px solid var(--color-gray3); display: flex; justify-content: flex-end; }
    .case-cta a {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--color-orange);
      font-size: 16px;
      line-height: 1.6;
      text-decoration: underline;
    }
    .case-cta a:hover { opacity: 0.8; color: var(--color-orange); }

    /* ===== PAGINATION ===== */
    .cases-pagination {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }
    .cases-count {
      font-size: 16px;
      line-height: 1.6;
      color: var(--color-gray2);
    }

    /* ===== CTA SECTION ===== */
    .cta-section {
      position: relative;
      overflow: hidden;
    }
    .cta-bg {
      position: absolute;
      inset: 0;
      background: linear-gradient(to bottom, #020202 0%, #0a0a0a 40%, #1e1f1f 100%);
      z-index: 0;
    }
    .cta-grafismo {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 80%;
      object-fit: contain;
      filter: brightness(3) saturate(5);
      opacity: 0.85;
      pointer-events: none;
      z-index: 1;
    }
    .cta-inner {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 42px;
      position: relative;
      z-index: 1;
      max-width: 1034px;
      margin: 0 auto;
      text-align: center;
    }
    .cta-text { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }

    /* ===== FOOTER ===== */
    .footer {
      background: var(--color-black);
      padding: 60px 0 42px;
      display: flex;
      flex-direction: column;
      gap: 42px;
    }
    .footer-col { display: flex; flex-direction: column; gap: 14px; }
    .footer-col-title { font-size: 18px; line-height: 1.2; color: var(--color-white); }
    .footer-col-link { font-size: 16px; line-height: 1.6; color: var(--color-gray1); }
    .footer-col-link:hover { color: var(--color-white); }
    .footer-accordion-mobile { display: none; }
    .footer-divider { width: 100%; height: 1px; background: var(--color-gray2); }
    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .footer-logo { display: flex; align-items: center; gap: 16px; }
    .footer-logo-brand { display: flex; align-items: center; gap: 16px; }
    .footer-logo-brand img { height: 20px; width: auto; }
    .footer-logo-separator { width: 1px; height: 20px; background: var(--color-gray1); }
    .footer-logo-tagline { font-size: 14px; color: var(--color-white); line-height: 1.4; white-space: nowrap; }
    .footer-copyright { font-size: 14px; color: var(--color-white); line-height: 1.4; }
    .footer-socials { display: flex; align-items: center; gap: 16px; }
    .footer-socials img { width: 32px; height: 32px; }

    /* ===== SECTION TITLE ===== */
    .section-title { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 1200px) {
      .section-padding { padding-top: 80px; padding-bottom: 80px; }
      .cases-container { padding-left: 48px; padding-right: 48px; }
    }

    @media (max-width: 991px) {
      .section-padding { padding-top: 60px; padding-bottom: 60px; }
      .nav-math {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--color-black);
        flex-direction: column;
        gap: 0;
        padding: 20px 24px;
        z-index: 99;
      }
      .nav-math.active { display: flex; }
      .nav-item { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
      .btn-header { display: none; }
      .hamburger { display: flex; }

      .page-header { padding: 60px 0 80px; }
      .cases-container { padding-left: 24px; padding-right: 24px; }
      .page-header-title { font-size: 32px; }
      .page-header-subtitle { font-size: 22px; }

      .heading-lg { font-size: 28px; }
      .heading-md { font-size: 22px; }
      .heading-xl { font-size: 32px; }

      .filter-bar { flex-direction: column; gap: 16px; }
      .filter-group { flex: unset; width: 100%; }
      .filter-group:first-child { flex: unset; width: 100%; }

      .cases-grid-item { width: calc((100% - 24px) / 2); }

      .cases-pagination { gap: 12px; }

      .footer { padding: 40px 0 30px; }
      .footer-columns-desktop { display: none !important; }
      .footer-accordion-mobile { display: block; }
      .footer-accordion-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
      .footer-accordion-item:last-child { border-bottom: none; }
      .footer-accordion-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: none;
        border: none;
        color: var(--color-white);
        font-size: 16px;
        font-weight: 700;
        padding: 16px 0;
        cursor: pointer;
        font-family: inherit;
        letter-spacing: 0.02em;
      }
      .footer-accordion-btn:focus { outline: none; }
      .footer-accordion-icon {
        transition: transform 0.3s ease;
        color: var(--color-gray1);
        flex-shrink: 0;
      }
      .footer-accordion-btn:not(.collapsed) .footer-accordion-icon {
        transform: rotate(180deg);
      }
      .footer-accordion-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 0 16px;
      }
      .footer-accordion-body .footer-col-link { font-size: 15px; }
      .footer-bottom { flex-direction: column; gap: 20px; text-align: center; align-items: center; }
      .footer-logo { flex-direction: column; }
      .footer-logo-brand { flex-wrap: wrap; justify-content: center; }
      .footer-logo-brand img { height: 18px; }
      .footer-logo-tagline { white-space: normal; text-align: center; }
      .footer-socials { flex-wrap: wrap; justify-content: center; }
      .footer-socials img { width: 28px; height: 28px; }

      .btn-math { font-size: 18px; padding: 14px 30px; height: auto; }
    }

    @media (max-width: 680px) {
      .cases-grid-item { width: 100%; }
    }

    @media (max-width: 480px) {
      .cases-container { padding-left: 16px; padding-right: 16px; }
      .case-results { flex-direction: column; }
      .page-header-title { font-size: 28px; }
      .page-header-subtitle { font-size: 18px; }
    }
  
/* === HEADER (from components/header.js <style> block) === */

  /* Note: .mega-menu-wrapper relies on .header's position: fixed as positioning context for .mega-dropdown */
  .mega-dropdown {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(2, 2, 2, 0.99);
    padding: 42px 96px;
    z-index: 99;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    visibility: hidden;
  }
  .mega-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }
  .mega-dropdown-tabs {
    display: flex;
    justify-content: space-between;
    width: 1037px;
    margin-bottom: 10px;
  }
  .mega-dropdown-tab {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 4px 24px 4px 90px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(to right, #1e1f1f 4%, #eaebeb 49%);
    font-family: 'Carbon', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.2;
    color: #020202;
    white-space: nowrap;
  }
  .mega-dropdown-tab:first-child { width: 188px; justify-content: flex-start; padding-left: 90px; }
  .mega-dropdown-tab:last-child { width: 200px; }
  .mega-dropdown-body {
    display: flex;
    gap: 24px;
  }
  .mega-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .mega-col-cases {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 1px solid #eaebeb;
    padding-left: 24px;
    align-self: stretch;
  }
  .mega-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    transition: background 0.15s;
  }
  .mega-item:hover { background: rgba(255,255,255,0.05); }
  .mega-item-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 24px;
    width: 350px;
  }
  .mega-col-cases .mega-item-content { width: 326px; }
  .mega-item-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .mega-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .mega-item-icon svg { width: 20px; height: 20px; }
  .mega-item-name {
    font-family: 'Halyard Display', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.2;
    color: #f9f8f8;
  }
  .mega-item-desc {
    font-family: 'Halyard Display', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    color: #f9f8f8;
  }
  .mega-item-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .nav-item.mega-active { color: #97999b !important; }
  .nav-item.mega-active .nav-chevron { transform: rotate(180deg); }
  .mega-dropdown.simple .mega-dropdown-body { gap: 0; }
  .mega-dropdown.simple .mega-col { flex: 1; padding: 0 12px; }
  .mega-dropdown.simple .mega-col + .mega-col { border-left: 1px solid rgba(255,255,255,0.08); }
  .mega-dropdown.simple.two-col .mega-dropdown-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
    row-gap: 16px;
    max-width: 1040px;
  }
  .mega-dropdown.simple.two-col .mega-dropdown-tabs { max-width: 1040px; }
  .mega-dropdown.simple.two-col .mega-col { flex: none; padding: 0; min-width: 0; }
  .mega-dropdown.simple.two-col .mega-col + .mega-col { border-left: none; }
  .mega-dropdown.simple.two-col .mega-item-content { width: auto; padding-right: 16px; }
  .mega-dropdown.simple.two-col .mega-item-desc { font-size: 16px; }
  .mega-dropdown-tabs.simple { display: flex; justify-content: flex-start; width: auto; margin-bottom: 16px; }
  .mega-dropdown-tabs.simple .mega-dropdown-tab { width: auto; min-width: 188px; }
  .header-right { display: flex; align-items: center; gap: 42px; }
  .lang-switcher { position: relative; }
  .lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
    color: #f9f8f8;
    font-family: 'Halyard Display', sans-serif;
    font-size: 18px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
  }
  .lang-switcher-btn:hover { opacity: 0.85; }
  .lang-switcher-btn > .lang-switcher-icon { width: 24px; height: 24px; flex-shrink: 0; object-fit: contain; }
  .lang-switcher-chevron { width: 12px !important; height: 6px !important; transition: transform 0.2s; }
  .lang-switcher.open .lang-switcher-chevron { transform: rotate(180deg); }
  .lang-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 120px;
    background: #020202;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 6px;
    display: none;
    z-index: 100;
  }
  .lang-switcher.open .lang-switcher-menu { display: block; }
  .lang-switcher-option {
    display: block;
    padding: 10px 12px;
    color: #f9f8f8;
    font-family: 'Halyard Display', sans-serif;
    font-size: 16px;
    line-height: 1.2;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
  }
  .lang-switcher-option:hover { background: rgba(255,255,255,0.08); color: #f9f8f8; }
  .lang-switcher-option.active { color: #ff8f1c; }

  /* Mobile-only elements: layout-transparent on desktop so wrapping doesn't
     affect the existing flex header. Level-1 sub-panels and mobile-actions
     stay hidden on desktop. */
  .nav-math-panel.level-0 { display: contents; }
  .nav-math-panel.level-1, .mobile-actions { display: none; }

  @media (max-width: 991px) {
    .mega-dropdown { display: none !important; }
    .header-right { display: none !important; }

    /* Hamburger -> X */
    .hamburger {
      display: flex !important;
      width: 40px;
      height: 40px;
      justify-content: center;
      align-items: center;
      gap: 5px;
      position: relative;
      z-index: 102;
    }
    .hamburger span {
      width: 22px;
      height: 2px;
      background: #f9f8f8;
      border-radius: 2px;
      transition: transform 0.25s ease, opacity 0.2s ease;
    }
    .hamburger.active span:nth-child(1) { transform: translate(0, 7px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translate(0, -7px) rotate(-45deg); }

    /* Mobile drawer */
    .nav-math {
      display: block !important;
      position: fixed !important;
      top: 80px !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      padding: 0 !important;
      gap: 0 !important;
      background: rgba(2, 2, 2, 0.98) !important;
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
      overflow: hidden;
      transform: translateX(100%);
      transition: transform 0.3s ease;
      z-index: 99;
      pointer-events: none;
    }
    .nav-math.active {
      transform: translateX(0);
      pointer-events: auto;
    }

    /* Drill-down panels */
    .nav-math-panel {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      padding: 18px 24px 32px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      transform: translateX(100%);
      transition: transform 0.32s cubic-bezier(.4,.1,.2,1), opacity 0.25s ease;
    }
    .nav-math-panel.level-0 {
      display: flex !important;
      transform: translateX(0);
    }
    .nav-math.has-sub .nav-math-panel.level-0 {
      transform: translateX(-22%);
      opacity: 0.25;
      pointer-events: none;
    }
    .nav-math-panel.level-1 {
      display: flex !important;
    }
    .nav-math-panel.level-1.active {
      transform: translateX(0);
    }

    /* Level-0 nav items */
    .nav-math .nav-item {
      display: flex;
      width: 100%;
      align-items: center;
      justify-content: space-between;
      padding: 18px 4px !important;
      border-bottom: 1px solid rgba(255,255,255,0.08) !important;
      font-size: 18px;
      font-weight: 500;
      color: #f9f8f8;
    }
    .nav-math .nav-item .nav-chevron {
      width: 8px !important;
      height: 13px !important;
      color: #97999b;
    }

    /* Sub-panel back button + title */
    .sub-back {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 8px 4px 0;
      background: none;
      border: none;
      color: #f9f8f8;
      font-family: 'Halyard Display', sans-serif;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      align-self: flex-start;
      margin-bottom: 8px;
    }
    .sub-back:active { opacity: 0.65; }
    .sub-back svg { width: 18px; height: 18px; flex-shrink: 0; }
    .sub-title {
      font-family: 'Carbon', sans-serif;
      font-weight: 700;
      font-size: 26px;
      line-height: 1.15;
      color: #f9f8f8;
      margin: 0 0 18px;
    }

    /* Sub-panel sections */
    .sub-section { display: flex; flex-direction: column; gap: 4px; }
    .sub-section + .sub-section {
      margin-top: 18px;
      padding-top: 18px;
      border-top: 1px solid rgba(255,255,255,0.08);
    }
    .sub-section-title {
      font-family: 'Carbon', sans-serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.14em;
      color: #97999b;
      text-transform: uppercase;
      padding: 0 4px 8px;
    }
    .sub-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 12px 8px;
      text-decoration: none;
      color: #f9f8f8;
      border-radius: 10px;
      transition: background 0.15s;
    }
    .sub-item:active { background: rgba(255,255,255,0.06); }
    .sub-item-icon {
      width: 40px;
      height: 40px;
      background: rgba(255,255,255,0.92);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .sub-item-icon svg { width: 22px; height: 22px; }
    .sub-item-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      flex: 1;
      min-width: 0;
    }
    .sub-item-name {
      font-family: 'Halyard Display', sans-serif;
      font-weight: 500;
      font-size: 16px;
      line-height: 1.3;
      color: #f9f8f8;
    }
    .sub-item-desc {
      font-family: 'Halyard Display', sans-serif;
      font-size: 13px;
      line-height: 1.4;
      color: #97999b;
    }
    .sub-item-arrow {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
      color: #97999b;
    }

    /* Mobile actions (CTA + lang) at the bottom of level-0 */
    .mobile-actions {
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 28px 0 8px;
      margin-top: auto;
    }
    .mobile-actions-cta {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 52px;
      border-radius: 8px;
      background: #ff8f1c;
      color: #020202;
      font-family: 'Halyard Display', sans-serif;
      font-weight: 600;
      font-size: 17px;
      text-decoration: none;
      transition: opacity 0.2s;
    }
    .mobile-actions-cta:active { opacity: 0.85; color: #020202; }
    .mobile-actions-langs {
      display: flex;
      gap: 8px;
    }
    .mobile-actions-lang {
      flex: 1;
      text-align: center;
      padding: 12px 0;
      border-radius: 6px;
      border: 1px solid rgba(255,255,255,0.15);
      color: #f9f8f8;
      font-family: 'Halyard Display', sans-serif;
      font-size: 15px;
      font-weight: 500;
      text-decoration: none;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }
    .mobile-actions-lang.active {
      background: rgba(44, 204, 211, 0.08);
      border-color: #2cccd3;
      color: #2cccd3;
    }

    html.nav-open, body.nav-open { overflow: hidden; }
  }

/* === BOOTSTRAP GRID SUBSET (footer.js needs it) === */

/* ---- Bootstrap grid subset (footer.js depends on it) ---- */
.container-xl { width: 100%; max-width: 1320px; padding-right: var(--bs-gutter-x, 0.75rem); padding-left: var(--bs-gutter-x, 0.75rem); margin-right: auto; margin-left: auto; }
.row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 0; display: flex; flex-wrap: wrap; margin-top: calc(-1 * var(--bs-gutter-y)); margin-right: calc(-0.5 * var(--bs-gutter-x)); margin-left: calc(-0.5 * var(--bs-gutter-x)); }
.row > * { flex-shrink: 0; width: 100%; max-width: 100%; padding-right: calc(var(--bs-gutter-x) * 0.5); padding-left: calc(var(--bs-gutter-x) * 0.5); margin-top: var(--bs-gutter-y); }
.row.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-md-3 { flex: 0 0 auto; }
.col-lg { flex: 1 0 0%; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.px-4 { padding-right: 1.5rem !important; padding-left: 1.5rem !important; }
@media (min-width: 768px) { .col-md-3 { width: 25%; } }
@media (min-width: 992px) { .px-lg-5 { padding-right: 3rem !important; padding-left: 3rem !important; } .col-lg { flex: 1 0 0%; width: auto; } }


/* ---- Elevate case-study DETAIL page tweaks (kept from previous cs-override) ---- */
.cs-title-container { margin-bottom: 50px; }
.cs-logo-wrapper { margin-bottom: 32px; }
.cs-testimonials-wrapper, .cs-about-company-wrapper, .cs-body-wrapper, .cs-metrics-wrapper, .cs-feature-wrapper { margin-bottom: 5rem; }
.cs-metrics-container .cs-metric__data { color: var(--color-orange, #ff8f1c); font-size: 56px; font-weight: 300; line-height: normal; }
*[data-module-hidden='true'] { display: none; }


/* ============================================================
   LISTING PAGE — restyle Elevate's React-rendered cs-listing__*
   to match pages/cases.html card design.
   ============================================================ */

/* Body wrapper: gradient background like .cases-body */
.cs-listing-wrapper.cs-background--off-white,
.cs-listing-wrapper {
  background: radial-gradient(ellipse at center, #ffffff 70%, #f9f8f8 75%, #c8c9ca 87.5%, #97999b 100%) !important;
  position: relative;
  overflow: hidden;
  padding-top: 80px !important;
  padding-bottom: 120px !important;
}
.cs-listing-wrapper .content-wrapper {
  max-width: 1440px;
  padding-left: 96px;
  padding-right: 96px;
  margin: 0 auto;
}

/* Heading + subheading: page-header treatment */
.cs-listing__heading {
  font-family: 'Halyard Display', sans-serif !important;
  font-weight: 600 !important;
  font-size: 48px !important;
  line-height: 1.2 !important;
  color: var(--color-gray2) !important;
  margin: 0 0 24px 0 !important;
  text-align: left !important;
}
.cs-listing__subheading {
  font-family: 'Halyard Display', sans-serif !important;
  font-weight: 500 !important;
  font-size: 28px !important;
  line-height: 1.2 !important;
  color: var(--color-gray2) !important;
  text-align: left !important;
  max-width: none !important;
  margin: 0 0 42px 0 !important;
}

/* Filter container — style as filter-section */
.cs-listing__filter-container {
  background: transparent !important;
  padding: 0 !important;
  margin-bottom: 42px !important;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cs-listing__filter-container::before {
  content: 'Filtros';
  font-family: 'Halyard Display', sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: var(--color-gray2);
}
.cs-listing__filter-container--inner {
  display: flex !important;
  gap: 24px;
  align-items: flex-end;
}
.cs-listing__filter,
select.cs-listing__filter {
  width: 100% !important;
  height: 52px !important;
  padding: 0 44px 0 16px !important;
  background: #fff !important;
  border: 1px solid var(--color-gray3) !important;
  border-radius: 4px !important;
  box-shadow: 0px 4px 12px rgba(2, 2, 2, 0.12) !important;
  font-family: 'Halyard Display', sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  color: var(--color-gray2) !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2397999b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
}
.cs-listing__filter:focus { border-color: var(--color-blue) !important; }

/* Card container — flex 3-col grid */
.cs-listing__card-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 24px !important;
}
.cs-listing__case-study {
  width: calc((100% - 48px) / 3) !important;
  background: #fff !important;
  border: 1px solid var(--color-gray3) !important;
  border-radius: 4px !important;
  box-shadow: 0px 4px 12px rgba(2, 2, 2, 0.12) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.cs-listing__case-study-link {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  text-decoration: none !important;
  color: inherit !important;
  padding: 0 !important;
}

/* Image with gradient overlay */
.cs-listing__image-container {
  position: relative !important;
  height: 200px !important;
  overflow: hidden !important;
  margin: 0 !important;
}
.cs-listing__image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #1e22aa, #2cccd3 50%, #ff8f1c);
  opacity: 0.35;
  pointer-events: none;
}
.cs-listing__image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
}

/* Card body */
.cs-listing__content-container {
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  flex: 1 !important;
  background: #fff !important;
}

/* Industry → turquoise outline badge */
.cs-listing__industry-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 !important;
}
.cs-listing__industry {
  display: inline-flex !important;
  align-items: center !important;
  height: 20px !important;
  padding: 4px 10px 5px !important;
  border-radius: 50px !important;
  border: 1px solid var(--color-turquoise) !important;
  background: transparent !important;
  font-family: 'Carbon', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  color: var(--color-turquoise) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Title */
.cs-listing__case-study-name {
  font-family: 'Halyard Display', sans-serif !important;
  font-weight: 500 !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  color: var(--color-gray2) !important;
  margin: 0 !important;
  letter-spacing: 0 !important;
}

/* "Ver case completo" footer link — synthesized via ::after on the link */
.cs-listing__case-study .cs-listing__content-container::after {
  content: 'Ver case completo →';
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--color-gray3);
  color: var(--color-orange);
  font-family: 'Halyard Display', sans-serif;
  font-size: 16px;
  text-decoration: underline;
  text-align: right;
}

/* Pagination — style as orange-outline button */
.cs-listing__pagination-container {
  margin-top: 42px !important;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.cs-listing__pagination-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 48px !important;
  height: 48px !important;
  padding: 12px 18px !important;
  border-radius: 4px !important;
  border: 1px solid var(--color-gray3) !important;
  background: #fff !important;
  font-family: 'Halyard Display', sans-serif !important;
  font-size: 16px !important;
  color: var(--color-gray2) !important;
  text-decoration: none !important;
  transition: opacity 0.2s, border-color 0.2s;
}
.cs-listing__pagination-link:hover { opacity: 0.85; border-color: var(--color-orange); }
.cs-listing__pagination-link.hs-active {
  background: var(--color-orange) !important;
  border-color: var(--color-orange) !important;
  color: #fff !important;
}

/* Responsive */
@media (max-width: 1200px) {
  .cs-listing-wrapper .content-wrapper { padding-left: 48px; padding-right: 48px; }
}
@media (max-width: 991px) {
  .cs-listing-wrapper .content-wrapper { padding-left: 24px; padding-right: 24px; }
  .cs-listing__heading { font-size: 32px !important; }
  .cs-listing__subheading { font-size: 22px !important; }
  .cs-listing__filter-container--inner { flex-direction: column; gap: 16px; }
  .cs-listing__case-study { width: calc((100% - 24px) / 2) !important; }
}
@media (max-width: 680px) {
  .cs-listing__case-study { width: 100% !important; }
}
@media (max-width: 480px) {
  .cs-listing-wrapper .content-wrapper { padding-left: 16px; padding-right: 16px; }
  .cs-listing__heading { font-size: 28px !important; }
  .cs-listing__subheading { font-size: 18px !important; }
}
