/* ========================================
   LINK TERKAIT - CLEAN MINIMAL STYLE
   ======================================== */

/* Section Wrapper */
.link-section-wrapper {
  padding: 0 3rem;
}

/* Swiper */
.link-terkait-swiper {
  overflow: visible;
  padding: 1rem 0 2rem;
}

.link-terkait-swiper .swiper-wrapper {
  align-items: center;
}

/* Link Item Wrapper */
.link-item-wrapper {
  position: relative;
  cursor: pointer;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.link-item-wrapper:active {
  transform: scale(0.95);
}

/* Tooltip */
.link-tooltip {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 200px;
  max-width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 1000;
  text-align: center;
}

/* Light mode tooltip */
[data-bs-theme="light"] .link-tooltip {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Dark mode tooltip */
[data-bs-theme="dark"] .link-tooltip {
  background: rgba(30, 30, 30, 0.98);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Tooltip arrow */
.link-tooltip::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--bs-border-color);
}

[data-bs-theme="light"] .link-tooltip::before {
  border-top-color: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .link-tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.15);
}

/* Tooltip arrow fill */
.link-tooltip::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--bs-body-bg);
}

[data-bs-theme="light"] .link-tooltip::after {
  border-top-color: #ffffff;
}

[data-bs-theme="dark"] .link-tooltip::after {
  border-top-color: rgba(30, 30, 30, 0.98);
}

/* Show tooltip on hover */
.link-item-wrapper:hover .link-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(calc(-100% - 8px));
}

/* Tooltip title */
.link-tooltip-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bs-body-color);
  margin-bottom: 0.25rem;
}

/* Tooltip description */
.link-tooltip-desc {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  line-height: 1.4;
}

/* Icon Box */
.link-icon-box {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Light mode specific */
[data-bs-theme="light"] .link-icon-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .link-icon-box:hover {
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Dark mode specific */
[data-bs-theme="dark"] .link-icon-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .link-icon-box:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Hover Effect */
.link-item-wrapper:hover .link-icon-box {
  transform: translateY(-4px);
}

/* Image */
.link-icon-image {
  width: 70%;
  height: 70%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.link-item-wrapper:hover .link-icon-image {
  transform: scale(1.1);
}

/* Placeholder Icon */
.link-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-icon-placeholder i {
  font-size: 2.75rem;
  color: var(--bs-primary);
  opacity: 0.8;
  transition: all 0.25s ease;
}

.link-item-wrapper:hover .link-icon-placeholder i {
  transform: scale(1.1);
  opacity: 1;
}

/* ========================================
   NAVIGATION BUTTONS - MINIMAL
   ======================================== */

.link-nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  padding: 0;
}

/* Light mode nav */
[data-bs-theme="light"] .link-nav-button {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .link-nav-button:hover {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

[data-bs-theme="light"] .link-nav-button:hover i {
  color: #ffffff;
}

/* Dark mode nav */
[data-bs-theme="dark"] .link-nav-button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .link-nav-button:hover {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

[data-bs-theme="dark"] .link-nav-button:hover i {
  color: #ffffff;
}

.link-nav-button i {
  font-size: 1.25rem;
  color: var(--bs-body-color);
  transition: color 0.2s ease;
}

.link-nav-button:active {
  transform: translateY(-50%) scale(0.9);
}

.link-nav-prev {
  left: 0;
}

.link-nav-next {
  right: 0;
}

/* Disabled state */
.link-nav-button:disabled,
.link-nav-button.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========================================
   MODAL CUSTOMIZATION
   ======================================== */

.modal-content {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
}

/* Light mode modal */
[data-bs-theme="light"] .modal-content {
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Dark mode modal */
[data-bs-theme="dark"] .modal-content {
  background: var(--bs-body-bg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.modal-header .btn-close {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body .btn-primary {
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.modal-body .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modal-body .btn-primary:active {
  transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
  .link-icon-box {
    width: 88px;
    height: 88px;
    border-radius: 14px;
  }

  .link-icon-placeholder i {
    font-size: 2.5rem;
  }
}

@media (max-width: 992px) {
  .link-section-wrapper {
    padding: 0 2.5rem;
  }

  .link-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 12px;
  }

  .link-icon-placeholder i {
    font-size: 2.25rem;
  }

  .link-nav-button {
    width: 36px;
    height: 36px;
  }

  .link-nav-button i {
    font-size: 1.125rem;
  }
}

@media (max-width: 768px) {
  .link-section-wrapper {
    padding: 0 2rem;
  }

  .link-icon-box {
    width: 72px;
    height: 72px;
  }

  .link-icon-placeholder i {
    font-size: 2rem;
  }

  .link-nav-button {
    width: 32px;
    height: 32px;
  }

  .link-nav-button i {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .link-section-wrapper {
    padding: 0 1.5rem;
  }

  .link-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 10px;
  }

  .link-icon-placeholder i {
    font-size: 1.75rem;
  }

  .link-item-wrapper {
    padding: 0.5rem;
  }

  .link-tooltip {
    min-width: 180px;
    max-width: 220px;
    padding: 0.625rem 0.875rem;
  }

  .link-tooltip-title {
    font-size: 0.8125rem;
  }

  .link-tooltip-desc {
    font-size: 0.6875rem;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.link-item-wrapper:focus-visible,
.link-nav-button:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .link-item-wrapper,
  .link-icon-box,
  .link-icon-image,
  .link-icon-placeholder i,
  .link-nav-button {
    transition: none;
  }
}
