/* ==============================================================
   SOFTLAND CONSTRUCTION LTD. — DOCUMENT & BROCHURE CENTER CSS
   ============================================================== */

.softland-doc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 26, 48, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.softland-doc-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.softland-doc-modal-container {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(197, 168, 128, 0.3);
}

.softland-doc-modal-overlay.active .softland-doc-modal-container {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.softland-doc-modal-header {
  background: linear-gradient(135deg, #0b1a30 0%, #132847 100%);
  color: #ffffff;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #c5a880;
  position: relative;
}

.softland-doc-modal-header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.softland-doc-modal-header-brand img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.softland-doc-modal-header-title h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px 0;
  letter-spacing: -0.2px;
}

.softland-doc-modal-header-title p {
  font-size: 13px;
  color: #c5a880;
  margin: 0;
  font-weight: 500;
}

.softland-doc-modal-close {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s ease;
}

.softland-doc-modal-close:hover {
  background: #c5a880;
  color: #0b1a30;
  transform: rotate(90deg);
}

/* Modal Controls: Search & Category Filter */
.softland-doc-modal-controls {
  padding: 18px 28px 12px 28px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.softland-doc-search-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.softland-doc-search-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #718096;
  font-size: 16px;
}

.softland-doc-search-input {
  width: 100%;
  padding: 12px 18px 12px 46px;
  font-size: 15px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  color: #1e293b;
}

.softland-doc-search-input:focus {
  border-color: #0b1a30;
  box-shadow: 0 0 0 4px rgba(11, 26, 48, 0.12);
}

.softland-doc-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.softland-doc-cat-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.softland-doc-cat-pill:hover {
  border-color: #0b1a30;
  color: #0b1a30;
}

.softland-doc-cat-pill.active {
  background: #0b1a30;
  color: #ffffff;
  border-color: #0b1a30;
}

.softland-doc-count-badge {
  margin-left: 5px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 7px;
  border-radius: 10px;
}

.softland-doc-cat-pill:not(.active) .softland-doc-count-badge {
  background: #e2e8f0;
  color: #64748b;
}

/* Modal Body / Scrollable Grid */
.softland-doc-modal-body {
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1;
}

.softland-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .softland-doc-grid {
    grid-template-columns: 1fr;
  }
  .softland-doc-modal-header {
    padding: 16px;
  }
  .softland-doc-modal-controls {
    padding: 14px 16px;
  }
  .softland-doc-modal-body {
    padding: 16px;
  }
}

/* Document Item Card */
.softland-doc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 16px;
  transition: all 0.22s ease;
  position: relative;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.03);
}

.softland-doc-card:hover {
  border-color: #c5a880;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(11, 26, 48, 0.09);
}

.softland-doc-card.featured {
  border-left: 4px solid #c5a880;
  background: linear-gradient(180deg, #ffffff 0%, #fdfcf9 100%);
}

.softland-doc-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: #ffffff;
  font-weight: 700;
}

.softland-doc-icon-box.docx {
  background: linear-gradient(135deg, #185abd 0%, #103f91 100%);
}

.softland-doc-icon-box.pdf {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
}

.softland-doc-icon-box.banner {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
}

.softland-doc-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.softland-doc-card-top {
  margin-bottom: 10px;
}

.softland-doc-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.softland-doc-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.softland-doc-title {
  font-size: 15px;
  font-weight: 700;
  color: #0b1a30;
  margin: 0 0 3px 0;
  line-height: 1.35;
}

.softland-doc-title-bn {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.softland-doc-desc {
  font-size: 12px;
  color: #475569;
  margin: 0 0 10px 0;
  line-height: 1.45;
}

.softland-doc-meta {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 500;
}

.softland-doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.softland-doc-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.softland-doc-btn-download {
  background: #0b1a30;
  color: #ffffff;
  border: 1px solid #0b1a30;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.softland-doc-btn-download:hover {
  background: #c5a880;
  border-color: #c5a880;
  color: #0b1a30;
  transform: translateY(-1px);
}

.softland-doc-btn-view {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.softland-doc-btn-view:hover {
  background: #e2e8f0;
  color: #0b1a30;
  border-color: #94a3b8;
}

/* Modal Footer & Admin Helper */
.softland-doc-modal-footer {
  background: #f8fafc;
  padding: 14px 28px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 10px;
}

.softland-doc-admin-info-btn {
  background: none;
  border: none;
  color: #0b1a30;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

.softland-doc-admin-info-btn:hover {
  background: #e2e8f0;
}

.softland-doc-admin-drawer {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  display: none;
}

.softland-doc-admin-drawer.open {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.softland-doc-empty {
  text-align: center;
  padding: 45px 20px;
  color: #64748b;
  grid-column: 1 / -1;
}

.softland-doc-empty i {
  font-size: 42px;
  color: #cbd5e1;
  margin-bottom: 12px;
  display: block;
}
