/* ===================================================================
   PRAMUKH BUSINESS - LEGAL DOCUMENTS PAGE STYLESHEET
   File: css/legal.css
   Company: Pramukh Easy Sale Marketing LLP
   Focused exclusively on Legal Documents & Certificate Viewer
   =================================================================== */

/* --- Legal Hero Banner --- */
.legal-hero-section {
  position: relative;
  background: url('../images/about-banner.jpg') no-repeat center center / cover;
  color: var(--text-white);
  padding: 100px 0 110px 0;
  overflow: hidden;
}

.legal-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(10, 46, 92, 0.95) 0%,
    rgba(10, 46, 92, 0.88) 55%,
    rgba(16, 69, 140, 0.82) 100%
  );
  z-index: 1;
}

.legal-hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.75);
}

.breadcrumb-nav a {
  color: var(--accent-orange);
  transition: color var(--transition-fast);
}

.breadcrumb-nav a:hover {
  color: var(--accent-orange-light);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

.legal-hero-title {
  font-family: var(--font-heading);
  font-size: 3.1rem;
  font-weight: 800;
  line-height: 1.2;
  color: #FFFFFF;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.legal-hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

/* --- Documents Grid Section --- */
.legal-docs-section {
  padding: 85px 0 110px 0;
  background: var(--bg-card-subtle);
}

.legal-docs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
}

.legal-docs-grid .doc-card {
  grid-column: span 2;
}

/* Center the second row of 2 cards symmetrically on desktop */
@media (min-width: 993px) {
  .legal-docs-grid .doc-card:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .legal-docs-grid .doc-card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

/* Individual Document Card */
.doc-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.doc-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(10, 46, 92, 0.15);
  border-color: rgba(245, 130, 32, 0.5);
}

/* Document Thumbnail Container */
.doc-thumb-wrap {
  position: relative;
  width: 100%;
  height: 380px;
  background: #F8FAFC;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}

.doc-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
  display: block;
}

.doc-card:hover .doc-thumb-wrap img {
  transform: scale(1.04);
}

/* Overlay & View Icon */
.doc-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 46, 92, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.doc-thumb-wrap:hover .doc-overlay {
  opacity: 1;
}

.doc-open-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-orange);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: scale(0.85);
  transition: transform var(--transition-fast);
}

.doc-thumb-wrap:hover .doc-open-btn {
  transform: scale(1);
}

/* Card Body: Only Title + View Button */
.doc-card-body {
  padding: 22px 24px 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  gap: 18px;
  flex: 1;
}

.doc-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0;
  line-height: 1.35;
  text-align: center;
}

.doc-card .btn-view-doc {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.doc-card .btn-view-doc:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 130, 32, 0.35);
}

/* --- FULLSCREEN DOCUMENT LIGHTBOX MODAL --- */
.doc-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 31, 64, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 20px;
}

.doc-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.doc-lightbox-box {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  background: #0A2E5C;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(245, 130, 32, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  transform: scale(0.92);
  transition: transform var(--transition-normal);
}

.doc-lightbox.active .doc-lightbox-box {
  transform: scale(1);
}

.doc-lightbox-header {
  padding: 18px 25px;
  background: #061F40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FFFFFF;
}

.doc-lightbox-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.doc-lightbox-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.doc-lightbox-close:hover {
  background: var(--accent-red);
  transform: scale(1.08);
}

.doc-lightbox-body {
  width: 100%;
  overflow-y: auto;
  max-height: 75vh;
  background: #061833;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.doc-lightbox-body img {
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.doc-lightbox-footer {
  padding: 16px 25px;
  background: #061F40;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

/* --- Responsive Rules for Legal Docs Page --- */
@media (max-width: 992px) {
  .legal-docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .legal-docs-grid .doc-card {
    grid-column: auto !important;
  }
}

@media (max-width: 768px) {
  .legal-hero-title {
    font-size: 2.2rem;
  }
  
  .legal-docs-grid {
    grid-template-columns: 1fr;
  }
  
  .doc-thumb-wrap {
    height: 320px;
  }
  
  .doc-lightbox-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}
