/* ═══════════════════════════════════════════════════════════════
   BeeWorks-IT · Expertise modal styles
   APPEND to the end of assets/css/main.css
   Assumes the existing theme variables are available:
     --c-orange, --c-amber, --c-blue-deep, --c-white, etc.
   If your variables have different names, only the 3 lines below
   need to be adapted.
   ═══════════════════════════════════════════════════════════════ */

/* Local fallbacks — keep only the ones you don't already define */
.modal-overlay {
  --mdl-deep:      #050A18;
  --mdl-card:      #0D1F3C;
  --mdl-border:    rgba(255, 92, 0, 0.18);
  --mdl-border-hi: rgba(255, 92, 0, 0.45);
  --mdl-orange:    #FF5C00;
  --mdl-amber:     #FFB800;
  --mdl-text:      #E8EAF0;
  --mdl-muted:     rgba(232, 234, 240, 0.75);
}

/* ─── Overlay ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 10, 24, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ─── Container ───────────────────────────────────────────────── */
.modal-overlay .modal-container {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: linear-gradient(180deg, #0D1F3C 0%, #081326 100%);
  border: 1px solid var(--mdl-border);
  border-radius: 16px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 92, 0, 0.06) inset,
    0 0 60px rgba(255, 92, 0, 0.08);
  padding: 40px 40px 32px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-overlay.is-open .modal-container {
  transform: translateY(0) scale(1);
}

/* Orange accent bar on top */
.modal-overlay .modal-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mdl-orange) 20%, var(--mdl-amber) 50%, var(--mdl-orange) 80%, transparent);
  opacity: 0.7;
}

/* ─── Close button ────────────────────────────────────────────── */
.modal-overlay .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 92, 0, 0.08);
  color: var(--mdl-text);
  border: 1px solid var(--mdl-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 2;
}

.modal-overlay .modal-close:hover {
  background: var(--mdl-orange);
  color: #fff;
  border-color: var(--mdl-orange);
  transform: rotate(90deg);
}

.modal-overlay .modal-close:focus-visible {
  outline: 2px solid var(--mdl-orange);
  outline-offset: 2px;
}

/* ─── Title ───────────────────────────────────────────────────── */
.modal-overlay .modal-title {
  margin: 0 0 20px;
  padding-right: 48px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.modal-overlay .modal-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--mdl-orange), var(--mdl-amber));
  border-radius: 2px;
}

/* ─── Body ────────────────────────────────────────────────────── */
.modal-overlay .modal-body {
  color: var(--mdl-text);
  font-size: 0.98rem;
  line-height: 1.65;
}

.modal-overlay .modal-lead {
  margin: 0 0 24px;
  font-size: 1.05rem;
  color: #fff;
  opacity: 0.92;
  padding-left: 14px;
  border-left: 2px solid var(--mdl-orange);
}

.modal-overlay .modal-section {
  margin-bottom: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-overlay .modal-section:first-of-type {
  padding-top: 0;
  border-top: none;
}

.modal-overlay .modal-section-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mdl-orange);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-overlay .modal-section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mdl-orange);
  box-shadow: 0 0 8px rgba(255, 92, 0, 0.6);
}

.modal-overlay .modal-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.modal-overlay .modal-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  color: var(--mdl-muted);
  line-height: 1.6;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.modal-overlay .modal-list li:last-child {
  border-bottom: none;
}

.modal-overlay .modal-list li::before {
  content: '▸';
  position: absolute;
  left: 4px;
  top: 8px;
  color: var(--mdl-orange);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ─── CTA ─────────────────────────────────────────────────────── */
.modal-overlay .modal-cta-wrap {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-overlay .modal-cta {
  /* Falls back to .btn.btn-solid which should already exist in main.css */
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ─── svc-arrow as button (no underline, cursor pointer) ──────── */
.svc-card .svc-arrow-modal {
  cursor: pointer;
  background: transparent;
  border: none;
  font: var(--font);
  color: #FF5C00;
  padding: 0;
  margin:8px;
  font-size: 13px;
}
.svc-card .svc-arrow-modal:focus-visible {
  outline: 2px solid var(--mdl-orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Mobile responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
  .modal-overlay { padding: 12px; }
  .modal-overlay .modal-container {
    padding: 32px 20px 24px;
    max-height: calc(100vh - 24px);
    border-radius: 12px;
  }
  .modal-overlay .modal-container::before {
    left: 20px;
    right: 20px;
  }
  .modal-overlay .modal-title {
    font-size: 1.4rem;
    padding-right: 40px;
  }
  .modal-overlay .modal-close {
    top: 12px;
    right: 12px;
  }
  .modal-overlay .modal-cta-wrap {
    justify-content: stretch;
  }
  .modal-overlay .modal-cta {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ─── Scrollbar styling inside modal ─────────────────────────── */
.modal-overlay .modal-container::-webkit-scrollbar {
  width: 8px;
}
.modal-overlay .modal-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.modal-overlay .modal-container::-webkit-scrollbar-thumb {
  background: rgba(255, 92, 0, 0.3);
  border-radius: 4px;
}
.modal-overlay .modal-container::-webkit-scrollbar-thumb:hover {
  background: var(--mdl-orange);
}

/* ─── Reduce motion for users who ask for it ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-overlay .modal-container,
  .modal-overlay .modal-close {
    transition: none;
  }
}
