@charset "UTF-8";

.altar-orientation-page {
  --altar-primary: #003c47;
  --altar-accent: #ff9900;
  --altar-warm: #fff8ee;
  --altar-sacred: #9a3412;
  --altar-good: #059669;
  --altar-bad: #dc2626;
  --altar-muted: #64748b;
  --altar-border: #e1e6ea;
  --altar-surface: #fff;
  --altar-soft: #f8fafc;
  --altar-radius-xl: 26px;
  --altar-radius-lg: 18px;
  --altar-shadow: 0 18px 48px rgba(0, 36, 44, 0.08);

  max-width: 1320px;
  margin: 10rem auto 4rem;
  padding: 0 16px;
  color: var(--altar-primary);

  * {
    box-sizing: border-box;
  }

  .altar-orientation-eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 153, 0, 0.35);
    border-radius: 999px;
    background: var(--altar-warm);
    color: #b45309;
    font-size: 1.18rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .altar-orientation-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(28px, 4vw, 48px);
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 46px);
    border-radius: var(--altar-radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
      linear-gradient(135deg, rgba(0, 45, 54, 0.95) 0%, rgba(0, 60, 71, 0.92) 55%, rgba(180, 83, 9, 0.88) 100%),
      url(../../../docs/images/common/project/caurongdanang.jpg) center / cover no-repeat;
    box-shadow: 0 20px 48px rgba(0, 35, 43, 0.22);

    .altar-orientation-hero__content {
      display: flex;
      flex-direction: column;
      justify-content: center;

      .altar-orientation-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border-color: rgba(255, 153, 0, 0.4);
        background: rgba(255, 153, 0, 0.16);
        color: #ffc278;
        padding: 5px 14px;
        font-size: 1.25rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        border-radius: 12px;
        backdrop-filter: blur(4px);

        svg {
          color: #ff9900;
          flex-shrink: 0;
        }
      }

      .altar-orientation-hero__title {
        max-width: 820px;
        margin: 14px 0;
        color: #ffffff;
        font-size: clamp(2.4rem, 3.2vw, 3.6rem);
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: -0.015em;
      }

      p {
        max-width: 700px;
        margin: 0 0 20px;
        color: rgba(255, 255, 255, 0.88);
        font-size: 1.5rem;
        line-height: 1.65;
      }

      .altar-orientation-hero__features {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;

        .altar-hero-chip {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          padding: 6px 14px;
          border-radius: 12px;
          background: rgba(255, 255, 255, 0.1);
          border: 1px solid rgba(255, 255, 255, 0.18);
          color: #f1f5f9;
          font-size: 1.25rem;
          font-weight: 500;
          backdrop-filter: blur(6px);
          transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;

          svg {
            color: #ff9900;
            flex-shrink: 0;
          }

          &:hover {
            background: rgba(255, 255, 255, 0.18);
            border-color: rgba(255, 153, 0, 0.45);
            transform: translateY(-1px);
          }
        }
      }
    }

    .altar-orientation-hero__visual {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      width: clamp(170px, 18vw, 225px);
      height: clamp(170px, 18vw, 225px);
      flex-shrink: 0;
      justify-self: center;

      &::before {
        content: "";
        position: absolute;
        inset: -20px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 153, 0, 0.22) 0%, rgba(0, 60, 71, 0) 70%);
        pointer-events: none;
      }

      &::after {
        content: "";
        position: absolute;
        inset: 4px;
        border-radius: 50%;
        border: 2px dashed rgba(255, 153, 0, 0.45);
        animation: heroDashedRingSpin 10s linear infinite;
        pointer-events: none;
      }

      .altar-hero-art {
        width: 82%;
        height: 82%;
        object-fit: contain;
        position: relative;
        z-index: 1;
        filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.35));
        transition: transform 0.5s ease;
      }

      &:hover .altar-hero-art {
        transform: scale(1.06) rotate(3deg);
      }
    }
  }

  .altar-orientation-tool {
    margin-top: 26px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--altar-border);
    border-radius: var(--altar-radius-xl);
    background: var(--altar-surface);
    box-shadow: var(--altar-shadow);
  }

  .altar-orientation-tool__intro {
    max-width: 900px;
    margin-bottom: 24px;

    .altar-orientation-tool__title {
      margin: 12px 0 10px;
      color: var(--altar-primary);
      font-size: clamp(2.4rem, 3vw, 3.5rem);
      font-weight: 900;
      line-height: 1.16;
    }

    p {
      margin: 0;
      color: var(--altar-muted);
      font-size: 1.48rem;
      line-height: 1.7;
    }
  }

  .altar-orientation-form {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: end;

    @media (max-width: 900px) {
      grid-template-columns: 1fr;
    }
  }

  .altar-orientation-field {
    position: relative;
    min-width: 0;
  }

  .altar-orientation-label {
    display: block;
    margin-bottom: 9px;
    color: var(--altar-primary);
    font-size: 1.32rem;
    font-weight: 850;
  }

  .altar-orientation-select {
    position: relative;
  }

  .altar-orientation-input {
    width: 100%;
    height: 52px;
    padding: 0 44px 0 15px;
    border: 1px solid var(--altar-border);
    border-radius: 14px;
    background: var(--altar-soft);
    color: var(--altar-primary);
    cursor: pointer;
    font-size: 1.38rem;
    font-weight: 720;
    outline: 0;

    &:focus {
      border-color: var(--altar-accent);
      background: #fff;
      box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.15);
    }

    &.shake {
      border-color: #ef4444;
      animation: altarOrientationShake 0.36s ease;
    }
  }

  .altar-orientation-select__icon {
    position: absolute;
    top: 18px;
    right: 15px;
    color: var(--altar-muted);
    pointer-events: none;
    transition: transform 0.2s ease;

    &.active {
      transform: rotate(180deg);
    }
  }

  .altar-orientation-error {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 4;
    color: #dc2626;
    font-size: 1.16rem;
    font-weight: 760;
  }

  .altar-orientation-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 30;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--altar-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 36, 44, 0.14);
  }

  .altar-orientation-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid var(--altar-border);

    .altar-orientation-search__input {
      display: block;
      width: 100%;
      height: 40px;
      margin: 0;
      padding: 0 42px 0 14px;
      border: 1px solid var(--altar-border);
      border-radius: 12px;
      color: var(--altar-primary);
      font-size: 1.32rem;
      outline: 0;
      background: #ffffff;

      &:focus {
        border-color: var(--altar-accent);
      }
    }

    .icon-tabler-search,
    svg,
    i {
      position: absolute;
      top: 50%;
      right: 24px;
      transform: translateY(-50%);
      width: 18px !important;
      height: 18px !important;
      display: block;
      vertical-align: initial;
      color: var(--altar-muted);
      pointer-events: none;
      flex-shrink: 0;
    }
  }

  .altar-orientation-suggestions--sex,
  .house-orientation-suggestions--sex {
    overflow: visible !important;
    width: 100%;
  }

  .altar-orientation-suggestions__list--sex,
  .house-orientation-suggestions__list--sex {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;

    .item-sex {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 46px;
      padding: 10px 14px;
      border: 1.5px solid var(--altar-border);
      border-radius: 12px;
      background: #ffffff;
      cursor: pointer;
      font-size: 1.35rem;
      font-weight: 750;
      color: var(--altar-primary);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

      .sex-option-icon {
        font-size: 1.5rem;
        transition: transform 0.2s ease;
      }

      &[data-sex="1"] .sex-option-icon {
        color: #0284c7;
      }

      &[data-sex="0"] .sex-option-icon {
        color: #e11d48;
      }

      &:hover {
        background: #fffdfa;
        border-color: var(--altar-accent);
        transform: translateY(-1px);

        .sex-option-icon {
          transform: scale(1.15);
        }
      }

      &.active {
        background: var(--altar-primary);
        border-color: var(--altar-accent);
        color: #ffffff;
        box-shadow: 0 4px 14px rgba(0, 60, 71, 0.25);

        .sex-option-icon {
          color: var(--altar-accent);
        }
      }
    }
  }

  .altar-orientation-suggestions--sex .altar-orientation-clear,
  .house-orientation-suggestions--sex .altar-orientation-clear {
    display: none !important;
    border-top: none !important;
  }

  /* Compass Pie Selector */
  .compass-pie-wrapper {
    padding: 14px 14px 8px;
    background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(0, 60, 71, 0.1);
    user-select: none;
  }

  .compass-pie-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
    text-align: center;
  }

  .compass-pie-header__title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--altar-primary);
    font-size: 1.35rem;
    font-weight: 850;

    svg {
      color: var(--altar-accent);
    }
  }

  .compass-pie-header__hint {
    color: var(--altar-muted);
    font-size: 1.15rem;
  }

  .compass-pie-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 0;
  }

  .compass-pie-svg {
    width: min(240px, 75vw);
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 6px 14px rgba(0, 60, 71, 0.08));
  }

  .altar-orientation-suggestions--direction,
  .house-orientation-suggestions--direction,
  #suggestions-info-direction {
    min-width: 360px !important;
    right: 0 !important;
    left: auto !important;
  }

  .compass-pie-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 0;
  }

  .compass-pie-svg {
    width: min(240px, 75vw);
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 6px 14px rgba(0, 60, 71, 0.08));
  }

  .compass-ring-outer {
    fill: #ffffff;
    stroke: var(--altar-accent, #ff9900);
    stroke-width: 2px;
  }

  .compass-ring-track {
    fill: none;
    stroke: rgba(0, 60, 71, 0.15);
    stroke-width: 1px;
    stroke-dasharray: 2 4;
  }

  .compass-pie-slice {
    cursor: pointer;
    outline: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: 150px 150px;

    .pie-slice-path {
      fill: #fdfbf7;
      stroke: #d9e2ec;
      stroke-width: 1.5px;
      transition: all 0.25s ease;
    }

    .pie-slice-label {
      fill: var(--altar-primary, #003c47);
      font-size: 11px;
      font-weight: 750;
      text-anchor: middle;
      pointer-events: none;
      transition: fill 0.2s ease;
    }

    &:hover {
      transform: scale(1.03);

      .pie-slice-path {
        fill: #fdf3e2;
        stroke: var(--altar-accent, #ff9900);
        stroke-width: 2px;
        filter: drop-shadow(0 2px 6px rgba(0, 60, 71, 0.2));
      }

      .pie-slice-label {
        fill: #003c47;
        font-weight: 850;
      }
    }

    &.active {
      transform: scale(1.05);

      .pie-slice-path {
        fill: url(#compassSliceActiveGrad);
        stroke: var(--altar-accent, #ff9900);
        stroke-width: 2.5px;
        filter: drop-shadow(0 3px 8px rgba(255, 153, 0, 0.45));
      }

      .pie-slice-label {
        fill: #ffffff;
        font-weight: 900;
      }
    }
  }

  .compass-center-disc {
    stroke: var(--altar-accent, #ff9900);
    stroke-width: 2.5px;
    filter: drop-shadow(0 3px 8px rgba(0, 20, 24, 0.35));
  }

  .compass-center-ring {
    fill: none;
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 1px;
  }

  .compass-needle-group {
    pointer-events: none;
  }

  .compass-needle-tip-north {
    fill: #e11d48;
  }

  .compass-needle-tip-south {
    fill: #cbd5e1;
  }

  .compass-needle-pivot {
    fill: var(--altar-accent, #ff9900);
    stroke: #ffffff;
    stroke-width: 1.5px;
  }

  .altar-orientation-suggestions__list {
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;

    &.altar-orientation-suggestions__list--directions {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
      padding: 10px 12px;
      background: #ffffff;

      @media (max-width: 576px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .item-direction {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 6px 4px;
        border: 1px solid var(--altar-border);
        border-radius: 10px;
        font-size: 1.22rem;
        font-weight: 750;
        background: #fdfdfb;
        text-align: center;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;

        &:hover {
          background: #fdf8ee;
          border-color: var(--altar-primary);
          color: var(--altar-primary);
        }

        &.active {
          background: var(--altar-primary);
          border-color: var(--altar-accent);
          color: #ffffff;
          box-shadow: 0 2px 8px rgba(0, 60, 71, 0.2);
        }
      }
    }
  }

  .altar-orientation-option,
  .suggestion-item {
    display: flex;
    min-height: 42px;
    align-items: center;
    padding: 9px 12px;
    border-radius: 11px;
    color: var(--altar-primary);
    cursor: pointer;
    font-size: 1.32rem;
    font-weight: 720;

    &:hover,
    &.active {
      background: var(--altar-warm);
      color: #9a3412;
    }
  }

  .altar-orientation-clear {
    display: none;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--altar-border);

    &.active {
      display: block;
    }
  }

  .altar-orientation-clear__button {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: var(--altar-warm);
    color: #9a3412;
    cursor: pointer;
    font-size: 1.28rem;
    font-weight: 850;
  }

  .altar-orientation-submit {
    display: inline-flex;
    grid-column: 1 / -1;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: 9px;
    min-width: 210px;
    margin-top: 22px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    background: var(--altar-primary);
    color: #fff;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 880;
    white-space: nowrap;
    box-shadow: 0 12px 26px rgba(0, 60, 71, 0.2);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;

    &:hover {
      background: #004d5b;
      transform: translateY(-2px);
      box-shadow: 0 16px 32px rgba(0, 60, 71, 0.26);
    }
  }

  /* Nâng cấp toàn diện phần Kết Quả Trả Ra Hướng Bàn Thờ kèm La Bàn Bát Trạch 24 Sơn Hướng */
  .altar-orientation-result {
    display: none;
    margin-top: 28px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;

    @media (max-width: 576px) {
      margin-top: 16px;

      .altar-orientation-result__image-wrapper {
        .luopan-svg-instrument {
          width: min(calc(100vh - 200px), 94vw);
          min-width: 280px;
        }
      }

      .altar-orientation-result__visual-caption {
        max-width: min(calc(100vh - 200px), 94vw);
        padding: 10px 14px;
      }
    }

    &.active {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 36px;
    }

    .altar-orientation-result__visual {
      position: static;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      min-height: auto;
      margin: 0 auto;
      gap: 16px;
      padding: 6px 0 14px;

      @media (min-width: 992px) {
        min-height: min(calc(100vh - 140px), 720px);
        gap: clamp(18px, 2.5vh, 26px);
        padding: 6px 0 18px;
      }
    }

    .altar-orientation-result__image-wrapper {
      position: relative;
      overflow: visible;
      border: none;
      background: transparent;
      padding: 0;
      box-shadow: none;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;

      .luopan-svg-instrument {
        width: min(calc(100vh - 210px), 640px, 92vw);
        min-width: 280px;
        height: auto;
        aspect-ratio: 1 / 1;
        display: block;
        filter: drop-shadow(0 12px 32px rgba(0, 36, 44, 0.18));
      }
    }

    .altar-orientation-result__visual-caption {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 6px;
      width: 100%;
      max-width: min(calc(100vh - 210px), 640px, 92vw);
      padding: 12px 24px;
      border: 1.5px solid rgba(0, 60, 71, 0.16);
      border-radius: 18px;
      background: #ffffff;
      box-shadow: 0 10px 28px rgba(0, 40, 48, 0.08);
      transition: border-color 0.4s ease, box-shadow 0.4s ease;

      .caption-label {
        color: var(--altar-muted);
        font-size: 1.12rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 700;
      }

      .caption-title {
        color: var(--altar-primary);
        font-size: clamp(1.35rem, 1.7vw, 1.55rem);
        font-weight: 900;
        line-height: 1.35;
        transition: color 0.4s ease;

        &.is-neutral {
          color: #64748b;
          font-weight: 750;
        }

        &.is-good {
          color: #047857;
        }

        &.is-bad {
          color: #c2410c;
        }
      }

      .caption-status-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 16px;
        border-radius: 999px;
        font-size: 1.2rem;
        font-weight: 850;
        letter-spacing: 0.3px;
        transition: background-color 0.4s ease, color 0.4s ease;

        &.neutral {
          background: #f1f5f9;
          color: #64748b;
        }

        &.good {
          background: #ecfdf5;
          color: #065f46;
          border: 1px solid rgba(5, 150, 105, 0.35);
        }

        &.bad {
          background: #fff7ed;
          color: #9a3412;
          border: 1px solid rgba(194, 65, 12, 0.35);
        }
      }

      &.altar-orientation-result__visual-caption--good {
        border-color: rgba(5, 150, 105, 0.4);
        box-shadow: 0 12px 32px rgba(5, 150, 105, 0.12);
      }

      &.altar-orientation-result__visual-caption--bad {
        border-color: rgba(194, 65, 12, 0.4);
        box-shadow: 0 12px 32px rgba(194, 65, 12, 0.12);
      }
    }

    .altar-orientation-result__content {
      width: 100%;
      max-width: 960px;
      display: flex;
      flex-direction: column;
      gap: 22px;
      opacity: 0;
      transform: translateY(24px);
      pointer-events: none;
      transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);

      &.is-revealed {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }
    }

    .altar-orientation-result__heading-group {
      text-align: center;
      margin-bottom: 4px;

      .altar-orientation-eyebrow {
        margin: 0 auto 8px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 12px;
        border-radius: 999px;
        background: rgba(0, 60, 71, 0.08);
        color: #003c47;
        font-size: 1.2rem;
        font-weight: 700;
        text-transform: uppercase;
      }
    }

    .altar-orientation-result__title {
      color: var(--altar-primary);
      font-size: clamp(2rem, 2.5vw, 2.6rem);
      font-weight: 800;
      line-height: 1.3;
    }

    .altar-orientation-result__meta {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;

      @media (max-width: 768px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .altar-orientation-result__pill {
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 12px 14px;
      border: 1px solid rgba(0, 60, 71, 0.1);
      border-radius: 14px;
      background: #ffffff;
      box-shadow: 0 4px 12px rgba(0, 40, 48, 0.04);

      .pill-label {
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--altar-muted);
        font-size: 1.15rem;
        font-weight: 600;

        svg {
          color: #ff9900;
        }
      }

      .pill-value {
        color: var(--altar-primary);
        font-size: 1.35rem;
        font-weight: 700;

        .pill-sub {
          font-weight: 500;
          color: #64748b;
          font-size: 1.18rem;
          margin-left: 3px;
        }
      }
    }

    .altar-orientation-result__summary-card {
      padding: 20px 24px;
      border-radius: 18px;
      border: 1.5px solid;
      background: #ffffff;
      box-shadow: 0 8px 24px rgba(0, 40, 48, 0.05);

      .summary-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
      }

      .summary-badge-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 14px;
        border-radius: 999px;
        font-size: 1.25rem;
        font-weight: 750;
        letter-spacing: 0.3px;

        &.is-good {
          background: #ecfdf5;
          color: #065f46;
          border: 1px solid rgba(5, 150, 105, 0.3);
        }

        &.is-bad {
          background: #fff7ed;
          color: #9a3412;
          border: 1px solid rgba(194, 65, 12, 0.3);
        }
      }

      .summary-score-tag {
        font-size: 2.2rem;
        font-weight: 900;
        color: #003c47;

        .score-scale {
          font-size: 1.3rem;
          color: #64748b;
        }
      }

      .summary-card-title {
        color: var(--altar-primary);
        font-size: 1.65rem;
        font-weight: 800;
        margin-bottom: 8px;
      }

      .summary-card-desc {
        color: #475569;
        font-size: 1.38rem;
        line-height: 1.65;
        margin: 0;
      }

      &.is-good {
        border-color: rgba(5, 150, 105, 0.3);
      }

      &.is-bad {
        border-color: rgba(194, 65, 12, 0.3);
      }
    }

    /* Khối CẢNH BÁO ĐẠI KỴ BÀN THỜ */
    .altar-warning-box {
      border: 1.5px solid rgba(220, 38, 38, 0.3);
      border-radius: 18px;
      background: linear-gradient(180deg, #fffafa 0%, #fef2f2 100%);
      padding: 18px 22px;
      box-shadow: 0 6px 20px rgba(220, 38, 38, 0.06);

      .warning-box-header {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #b91c1c;
        font-size: 1.45rem;
        font-weight: 800;
        margin-bottom: 12px;

        svg {
          color: #dc2626;
        }
      }

      .warning-box-list {
        margin: 0;
        padding-left: 20px;
        display: flex;
        flex-direction: column;
        gap: 8px;

        li {
          color: #7f1d1d;
          font-size: 1.34rem;
          line-height: 1.6;
        }
      }
    }

    /* Khối đặc thù TỌA CÁT HƯỚNG CÁT */
    .altar-toa-cat-box {
      border: 1.5px solid rgba(255, 153, 0, 0.4);
      border-radius: 18px;
      background: linear-gradient(180deg, #fffcf7 0%, #fff8ee 100%);
      padding: 20px 24px;
      box-shadow: 0 8px 24px rgba(255, 153, 0, 0.08);

      .toa-cat-box__header {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #b45309;
        font-size: 1.55rem;
        font-weight: 800;
        margin-bottom: 12px;

        svg {
          color: #ff9900;
        }
      }

      .toa-cat-box__body {
        p {
          color: #451a03;
          font-size: 1.38rem;
          line-height: 1.65;
          margin: 0 0 16px;
        }
      }

      .toa-cat-tags-row {
        display: flex;
        flex-direction: column;
        gap: 8px;

        .row-label {
          color: #78350f;
          font-size: 1.25rem;
          font-weight: 750;
        }

        .row-tags {
          display: flex;
          flex-wrap: wrap;
          gap: 8px;
        }

        .cat-tag {
          display: inline-flex;
          align-items: center;
          padding: 6px 14px;
          border-radius: 10px;
          background: #ecfdf5;
          border: 1px solid rgba(5, 150, 105, 0.3);
          color: #047857;
          font-size: 1.25rem;
          font-weight: 750;
        }
      }
    }

    .altar-sections-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;

      @media (max-width: 640px) {
        grid-template-columns: 1fr;
      }
    }

    .altar-card-detail {
      padding: 18px 20px;
      border: 1px solid rgba(0, 60, 71, 0.1);
      border-radius: 16px;
      background: #ffffff;
      box-shadow: 0 4px 16px rgba(0, 40, 48, 0.04);

      .card-detail-header {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #003c47;
        font-size: 1.4rem;
        font-weight: 750;
        margin-bottom: 10px;

        svg {
          color: #ff9900;
        }
      }

      .card-detail-body {
        color: #475569;
        font-size: 1.34rem;
        line-height: 1.6;
        margin: 0;
      }
    }

    .altar-orientation-result__directions {
      padding: 22px 24px;
      border: 1px solid rgba(0, 60, 71, 0.1);
      border-radius: 18px;
      background: #ffffff;
      box-shadow: 0 6px 20px rgba(0, 40, 48, 0.04);

      .altar-orientation-result__subhead {
        color: #003c47;
        font-size: clamp(1.9rem, 2.4vw, 2.3rem);
        font-weight: 900 !important;
        margin-bottom: 22px;
        text-align: center;
        letter-spacing: -0.3px;
        text-transform: uppercase;
      }

      .altar-orientation-result__direction-columns {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        align-items: stretch;

        @media (max-width: 680px) {
          grid-template-columns: 1fr;
        }
      }

      .altar-orientation-direction-column {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
      }

      .direction-column-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 1.45rem;
        font-weight: 850;
        margin-bottom: 14px;
        padding-bottom: 10px;
        border-bottom: 2px solid;
        min-height: 48px;
        box-sizing: border-box;

        svg {
          width: 18px;
          height: 18px;
          flex-shrink: 0;
        }

        &.is-good {
          color: #15803d;
          border-color: #15803d;

          svg {
            color: #16a34a;
          }
        }

        &.is-bad {
          color: #b91c1c;
          border-color: #dc2626;

          svg {
            color: #dc2626;
          }
        }
      }

      .altar-orientation-direction-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: grid;
        grid-template-rows: repeat(4, 1fr);
        gap: 12px;
        flex: 1;
        height: 100%;
        min-height: 0;
      }

      .altar-orientation-direction {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 110px;
        box-sizing: border-box;
        padding: 14px 16px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid rgba(0, 60, 71, 0.08);
        transition: all 0.2s ease;

        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(0, 60, 71, 0.08);
        }

        &.altar-orientation-direction--good {
          background: #f2fbf4;
          border-color: #bbf7d0;

          .direction-name-star__score,
          .altar-orientation-direction__score {
            background: #15803d;
            color: #ffffff;
          }
        }

        &.altar-orientation-direction--bad {
          background: #fef4f4;
          border-color: #fecaca;

          .direction-name-star__score,
          .altar-orientation-direction__score {
            background: #b91c1c;
            color: #ffffff;
          }
        }

        .altar-orientation-direction__info {
          display: flex;
          flex-direction: column;
          height: 100%;
          flex: 1;
        }

        .direction-name-star {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
          margin-bottom: 8px;

          .direction-name-star__title {
            color: #003c47;
            font-size: 1.42rem;
            font-weight: 850 !important;
            letter-spacing: -0.2px;
          }

          .direction-name-star__score,
          .altar-orientation-direction__score {
            display: inline-flex;
            min-width: 48px;
            height: 26px;
            align-items: center;
            justify-content: center;
            padding: 2px 10px;
            border-radius: 999px;
            font-size: 1.18rem;
            font-weight: 900;
            letter-spacing: 0.3px;
            flex-shrink: 0;
          }
        }

        p {
          margin: 0;
          color: #52606d;
          font-size: 1.3rem;
          line-height: 1.58;
          flex: 1;
        }
      }
    }

    .altar-expert-box {
      border: 1px solid rgba(255, 153, 0, 0.35);
      border-radius: 16px;
      background: #fffdfa;
      padding: 18px 22px;

      .expert-box-header {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #b45309;
        font-size: 1.45rem;
        font-weight: 800;
        margin-bottom: 10px;

        svg {
          color: #ff9900;
        }
      }

      .expert-box-body {
        color: #78350f;
        font-size: 1.34rem;
        line-height: 1.65;
        margin: 0;
      }
    }
  }

  .altar-orientation-guide {
    margin-top: clamp(40px, 5vw, 60px);
    padding: clamp(28px, 4vw, 42px);
    border: 1px solid rgba(0, 60, 71, 0.1);
    border-radius: var(--altar-radius-xl, 24px);
    background: linear-gradient(180deg, #ffffff 0%, #fffcf8 100%);
    box-shadow: 0 16px 40px rgba(0, 45, 54, 0.06);

    .altar-orientation-guide__heading {
      text-align: left;
      max-width: 820px;
      margin-bottom: 30px;

      .altar-orientation-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 14px;
        border-radius: 999px;
        background: rgba(0, 60, 71, 0.07);
        border: 1px solid rgba(0, 60, 71, 0.14);
        color: #003c47;
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        margin-bottom: 12px;

        svg {
          width: 16px;
          height: 16px;
          color: #ff9900;
        }
      }

      .altar-orientation-guide__title {
        color: #002d36;
        font-size: clamp(2.2rem, 2.6vw, 3rem);
        font-weight: 800;
        margin: 12px 0 8px;
        line-height: 1.25;
      }

      p {
        color: #64748b;
        font-size: 1.45rem;
        margin: 0;
      }
    }

    .altar-orientation-guide__grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 22px;
      align-items: stretch;

      @media (max-width: 900px) {
        grid-template-columns: 1fr !important;
        gap: 16px;
      }
    }

    .altar-orientation-guide-card {
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      border: 1px solid rgba(0, 60, 71, 0.09);
      border-radius: 20px;
      padding: 24px;
      background: #ffffff;
      box-shadow: 0 4px 20px rgba(0, 60, 71, 0.05);
      transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
      overflow: hidden;

      &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: #003c47;
        opacity: 0;
        transition: opacity 0.25s ease;
      }

      &:hover {
        transform: translateY(-5px);
        box-shadow: 0 16px 36px rgba(0, 60, 71, 0.12);
        border-color: rgba(255, 153, 0, 0.35);

        &::after {
          opacity: 1;
        }

        .altar-orientation-guide-card__icon {
          background: linear-gradient(135deg, #003c47 0%, #005666 100%);
          color: #ffffff;
          transform: scale(1.06) rotate(3deg);
        }

        .altar-orientation-guide-title {
          color: #ff9900;
        }
      }

      .altar-orientation-guide-card__body {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
      }

      .altar-orientation-guide-card__info {
        flex: 1;
        min-width: 0;

        .altar-orientation-guide-title {
          margin: 0 0 8px;
          color: #003c47;
          font-size: 1.85rem;
          font-weight: 700;
          line-height: 1.35;
          transition: color 0.2s ease;
        }

        p {
          margin: 0;
          color: #475569;
          font-size: 1.38rem;
          line-height: 1.6;
        }
      }

      .altar-orientation-guide-card__icon {
        flex: 0 0 54px;
        width: 54px;
        height: 54px;
        border-radius: 14px;
        background: rgba(0, 60, 71, 0.08);
        border: 1px solid rgba(0, 60, 71, 0.12);
        color: #003c47;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;

        svg {
          width: 26px;
          height: 26px;
        }
      }

      .altar-orientation-guide-card__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 14px;
        margin-top: 16px;
        border-top: 1px solid rgba(0, 60, 71, 0.08);

        .guide-card-tag {
          font-size: 1.25rem;
          font-weight: 600;
          color: #003c47;
          background: rgba(0, 60, 71, 0.06);
          padding: 4px 10px;
          border-radius: 6px;
        }

        .guide-card-step {
          width: 28px;
          height: 28px;
          border-radius: 50%;
          background: rgba(0, 60, 71, 0.06);
          color: #003c47;
          font-size: 1.2rem;
          font-weight: 700;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
    }
  }
}

@keyframes altarOrientationShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes altarIconPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  28% {
    opacity: 0.46;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.72);
  }
}

@keyframes heroDashedRingSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ========================================================
   HOẠT ẢNH LA BÀN BÁT TRẠCH ĐA TẦNG NGHỊCH LUÂN (LUOPAN)
   ======================================================== */
.luopan-ring {
  transform-origin: 320px 320px;
  will-change: transform;
}

.luopan-svg-instrument.is-animating {
  .luopan-ring--degrees {
    animation: luopanSettleDegrees 4.2s cubic-bezier(0.12, 1, 0.28, 1) forwards;
  }

  .luopan-ring--duniens {
    animation: luopanSettleDuNien 4.2s cubic-bezier(0.12, 1, 0.28, 1) forwards;
  }

  .luopan-ring--24-mountains {
    animation: luopanSettleMountains 4.2s cubic-bezier(0.12, 1, 0.28, 1) forwards;
  }

  .luopan-ring--directions {
    animation: luopanSettleDirections 4.2s cubic-bezier(0.12, 1, 0.28, 1) forwards;
  }

  .luopan-ring--bagua-names {
    animation: luopanSettleBagua 4.2s cubic-bezier(0.12, 1, 0.28, 1) forwards;
  }

  .luopan-ring--trigrams {
    animation: luopanSettleTrigrams 4.2s cubic-bezier(0.12, 1, 0.28, 1) forwards;
  }

  .luopan-ring--yinyang {
    animation: luopanSettleYinYang 4.2s cubic-bezier(0.12, 1, 0.28, 1) forwards;
  }
}

.luopan-needle-group {
  transform-origin: 320px 320px;
  transition: transform 4.2s cubic-bezier(0.12, 1, 0.28, 1);
  will-change: transform;
  filter: drop-shadow(0 3px 5px rgba(0, 36, 44, 0.28));
}

.luopan-target-highlight {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-in-out;
  will-change: opacity;

  &.is-visible {
    opacity: 1;
  }
}

/* Vòng tâm: Âm Dương Thái Cực quay 3 vòng (-1080deg) CW */
@keyframes luopanSettleYinYang {
  0% { transform: rotate(-1080deg); }
  100% { transform: rotate(0deg); }
}

/* Tầng 1: Hào quẻ Bát Quái quay 2.5 vòng (900deg) CCW */
@keyframes luopanSettleTrigrams {
  0% { transform: rotate(900deg); }
  100% { transform: rotate(0deg); }
}

/* Tầng 2: Tên 8 Quẻ quay 2 vòng (-720deg) CW */
@keyframes luopanSettleBagua {
  0% { transform: rotate(-720deg); }
  100% { transform: rotate(0deg); }
}

/* Tầng 3: 8 Hướng Địa Lý quay 1.5 vòng (540deg) CCW */
@keyframes luopanSettleDirections {
  0% { transform: rotate(540deg); }
  100% { transform: rotate(0deg); }
}

/* Tầng 4: 24 Sơn Hướng quay 1 vòng (-360deg) CW */
@keyframes luopanSettleMountains {
  0% { transform: rotate(-360deg); }
  100% { transform: rotate(0deg); }
}

/* Tầng 5: 8 Cung Du Niên quay 0.5 vòng (180deg) CCW */
@keyframes luopanSettleDuNien {
  0% { transform: rotate(180deg); }
  100% { transform: rotate(0deg); }
}

/* Tầng 6: Vành 360 độ quay 90 độ (-90deg) CW */
@keyframes luopanSettleDegrees {
  0% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}

@media (max-width: 1000px) {
  .altar-orientation-page {
    margin: 4rem auto 3rem;

    .altar-orientation-hero {
      grid-template-columns: 1fr;
    }
  }
}

@media (max-width: 760px) {
  .mobile-search-section {
    display: none;
  }

  .altar-orientation-page {
    margin: 3rem auto 2rem;
    padding: 0 10px;

    .altar-orientation-hero {
      padding: 20px 16px;
      border-radius: 18px;

      .altar-orientation-hero__title {
        font-size: clamp(2rem, 5.5vw, 2.5rem);
        margin: 10px 0;
      }

      p {
        font-size: 1.35rem;
        margin-bottom: 12px;
      }

      .altar-orientation-hero__features {
        display: none !important;
      }
    }

    .altar-orientation-hero__visual {
      display: none;
    }

    .altar-orientation-tool,
    .altar-orientation-guide {
      border-radius: 18px;
      padding: 16px 12px;
    }

    .altar-orientation-tool__intro {
      margin-bottom: 16px;

      .altar-orientation-tool__title {
        font-size: clamp(1.85rem, 5vw, 2.3rem);
      }

      p {
        font-size: 1.35rem;
      }
    }

    .altar-orientation-guide__grid {
      grid-template-columns: 1fr;
    }

    .altar-orientation-submit {
      width: 100%;
      max-width: 320px;
      justify-self: center;
    }

    .altar-orientation-result__title {
      font-size: clamp(1.8rem, 4.8vw, 2.2rem);
    }
  }
}
