/* ==========================================
   DOCKYARD MODAL STYLING (Dedicated classes)
   ========================================== */

/* Animations */
@keyframes dockyardModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dockyardModalSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
}

/* Dockyard Modal Container */
.dockyard-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

/* Modal Inner - Properly sized */
.dockyard-modal-inner {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 1400px;
  width: 90%;
  height: 85vh;
  max-height: 900px;
  overflow: hidden;
  position: relative;
  animation: dockyardModalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10001;
  display: flex;
  flex-direction: column;
}

.dockyard-detail-modal.closing .dockyard-modal-inner {
  animation: dockyardModalSlideOut 0.3s ease-out forwards;
}

.dockyard-detail-modal.closing {
  pointer-events: none;
}

/* Content Wrapper */
.dockyard-modal-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* TOP: Image Section */
.dock-image-section {
  width: 100%;
  height: 320px;
  flex-shrink: 0;
  overflow: hidden;
}

.dock-image-figure {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.dock-image-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* BOTTOM: Content Section */
.dock-content-section {
  display: flex;
  gap: 80px;
  padding: 50px 80px;
  background: #ffffff;
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
}

/* Smooth scrollbar styling */
.dock-content-section::-webkit-scrollbar {
  width: 8px;
}

.dock-content-section::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.dock-content-section::-webkit-scrollbar-thumb {
  background: #5b4c91;
  border-radius: 10px;
}

.dock-content-section::-webkit-scrollbar-thumb:hover {
  background: #4a3d77;
}

/* Left Column: Title */
.dock-title-col {
  flex: 0 0 220px;
}

.dock-title-col h2 {
  font-size: 52px;
  line-height: 1.2;
  background: linear-gradient(to right, #240a66, #4c318fa2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Right Column: Info - Use CSS columns to auto-split content */
.dock-info-col {
  flex: 1;
  column-count: 2;
  column-gap: 60px;
}

/* Prevent paragraphs from breaking across columns */
.dock-info-col p {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Specification rows: label left, value right */
.dock-spec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dock-spec-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  column-gap: 12px;
  align-items: baseline;
}

.dock-spec-row .label {
  color: #333333;
  font-weight: 600;
  position: relative;
}

.dock-spec-row .label::after {
  content: ":";
  margin-left: 6px;
  color: #9aa0a6;
}

.dock-spec-row .value {
  color: #666666;
}

/* First paragraph is the heading */
.dock-spec-column p:first-child,
.dock-facility-column p:first-child {
  font-size: 16px;
  font-weight: 700 !important;
  color: #333333 !important;
  margin: 0 0 15px 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}

.dock-spec-column p:first-child::before,
.dock-facility-column p:first-child::before {
  content: none !important;
}

/* Regular paragraphs - list items */
.dock-facility-column p:not(:first-child) {
  font-size: 15px;
  line-height: 2;
  color: #666666;
  margin: 0 0 8px 0;
  padding-left: 20px;
  position: relative;
}

.dock-facility-column p:not(:first-child)::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #5b4c91;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.6;
}

/* Remove bullets in spec column paragraphs (in case content remains) */
.dock-spec-column p:not(:first-child) {
  padding-left: 0;
}
.dock-spec-column p:not(:first-child)::before {
  content: none;
}

/* Style direct paragraphs in dock-info-col */
.dock-info-col > p {
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.8;
  color: #666666;
}

/* Paragraphs after first are list items with bullets */
.dock-info-col > p:not(:first-child) {
  position: relative;
}

.dock-info-col ul {
  padding-left: 0;
  list-style: none;
  margin: 15px 0;
}

.dock-info-col li {
  font-size: 15px;
  line-height: 1.8;
  color: #666666;
  padding-left: 16px;
  position: relative;
  margin-bottom: 8px;
}

.dock-info-col li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #5b4c91;
  font-weight: bold;
}

.dock-info-col strong {
  color: #333333;
  font-weight: 600;
}

/* Close Button */
.dockyard-close-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: rgba(240, 240, 240, 0.95);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.dockyard-close-btn:hover {
  opacity: 0.85;
}

.dockyard-close-btn::before,
.dockyard-close-btn::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 3px;
  background: #666666;
  border-radius: 2px;
}

.dockyard-close-btn::before {
  transform: rotate(45deg);
}

.dockyard-close-btn::after {
  transform: rotate(-45deg);
}

/* Overlay */
.dockyard-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
}

/* Empty State */
.center {
  padding: 100px 40px;
  text-align: center;
  color: #666;
}

/* Responsive */
@media (max-width: 1366px) {
  .dockyard-modal-inner {
    height: 82vh;
    max-height: 850px;
  }

  .dock-image-section {
    height: 300px;
  }
  .dock-content-section {
    gap: 50px;
    padding: 40px 60px;
  }
  .dock-title-col {
    flex: 0 0 180px;
  }
  .dock-title-col h2 {
    font-size: 44px;
  }
  .dock-info-col {
    gap: 40px;
  }

  /* Adjust spec row for smaller screens */
  .dock-spec-row {
    grid-template-columns: 160px 1fr;
    column-gap: 10px;
  }

  .dock-spec-row .label,
  .dock-spec-row .value {
    font-size: 14px;
  }

  .dock-spec-column p:first-child,
  .dock-facility-column p:first-child {
    font-size: 15px;
  }

  .dock-facility-column p:not(:first-child) {
    font-size: 14px;
    margin: 0 0 6px 0;
  }
}

@media (max-width: 1200px) {
  .dockyard-modal-inner {
    height: 85vh;
  }

  .dock-image-section {
    height: 280px;
  }
  .dock-content-section {
    gap: 40px;
    padding: 35px 50px;
  }
  .dock-title-col {
    flex: 0 0 160px;
  }
  .dock-title-col h2 {
    font-size: 40px;
  }
  .dock-info-col {
    gap: 30px;
  }

  /* Further reduce spec row spacing */
  .dock-spec-row {
    grid-template-columns: 140px 1fr;
    column-gap: 8px;
  }

  .dock-spec-list {
    gap: 6px;
  }

  .dock-spec-row .label,
  .dock-spec-row .value {
    font-size: 13px;
  }

  .dock-spec-column p:first-child,
  .dock-facility-column p:first-child {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .dock-facility-column p:not(:first-child) {
    font-size: 13px;
    line-height: 1.8;
  }
}

@media (max-width: 1023px) {
  .dockyard-modal-inner {
    height: 88vh;
  }

  .dock-image-section {
    height: 250px;
  }
  .dock-content-section {
    flex-direction: column;
    gap: 30px;
    padding: 35px 45px;
  }
  .dock-title-col h2 {
    font-size: 40px;
    white-space: normal;
  }
  .dock-info-col {
    column-count: 1;
    column-gap: 0;
  }
}

@media (max-width: 767px) {
  .dockyard-modal-inner {
    height: 90vh;
  }

  .dock-image-section {
    height: 220px;
  }
  .dock-content-section {
    gap: 25px;
    padding: 30px 35px;
  }
  .dock-title-col h2 {
    font-size: 36px;
  }
  .dockyard-close-btn {
    width: 44px;
    height: 44px;
  }
}
