/* Work Hero Section */
.work-hero {
  text-align: center;
  padding: 60px 20px 50px;
  background: linear-gradient(135deg, #003366 0%, #0056b3 50%, #00509e 100%);
  position: relative;
  overflow: hidden;
}

.work-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: rotatePattern 40s linear infinite;
  opacity: 0.4;
}

@keyframes rotatePattern {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.work-title-animate {
  font-size: 3em;
  color: #ffffff;
  margin: 0 0 15px 0;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: slideInTitle 1.2s ease-out;
  position: relative;
  z-index: 1;
}

@keyframes slideInTitle {
  0% { opacity: 0; transform: translateY(-40px); }
  100% { opacity: 1; transform: translateY(0); }
}

.work-subtitle {
  font-size: 1.3em;
  color: #ffd700;
  margin: 10px 0 20px 0;
  animation: fadeIn 1.5s;
  position: relative;
  z-index: 1;
}

.title-underline {
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
  margin: 0 auto;
  border-radius: 2px;
  animation: expandLine 1.5s ease-out;
  position: relative;
  z-index: 1;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 30px 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, #ffffff, #f0f8ff);
  border: 2px solid #0056b3;
  color: #003366;
  font-size: 1.05em;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(0,86,179,0.2);
}

.filter-btn:hover {
  background: linear-gradient(135deg, #0056b3, #0066cc);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,86,179,0.4);
}

.filter-btn.active {
  background: linear-gradient(135deg, #0056b3, #003366);
  color: white;
  box-shadow: 0 4px 15px rgba(0,86,179,0.5);
}

/* Work Gallery Grid */
.work-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.work-item {
  opacity: 1;
  transform: scale(1);
  transition: all 0.5s;
}

.work-item.hidden {
  display: none;
}

/* Reveal Animation */
.reveal-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s, transform 0.8s;
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Work Card */
.work-card {
  background: linear-gradient(135deg, #ffffff, #fafcff);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,86,179,0.15);
  transition: all 0.4s;
  border: 2px solid rgba(0,86,179,0.1);
}

.work-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 45px rgba(0,86,179,0.3);
}

/* Image Card */
.image-card .image-container {
  position: relative;
  overflow: hidden;
  height: 350px;
}

.work-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.image-card:hover .work-img {
  transform: scale(1.15);
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,51,102,0.95), rgba(0,51,102,0.7), transparent);
  padding: 30px 20px 20px;
  transform: translateY(100%);
  transition: transform 0.4s;
  color: white;
}

.image-card:hover .image-overlay {
  transform: translateY(0);
}

.image-overlay h3 {
  margin: 0 0 8px 0;
  font-size: 1.4em;
  color: #ffffff;
}

.image-overlay p {
  margin: 0 0 15px 0;
  color: #ffd700;
  font-size: 1em;
}

.view-btn {
  padding: 10px 20px;
  background: #ffd700;
  color: #003366;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1em;
}

.view-btn:hover {
  background: #ffed4e;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255,215,0,0.5);
}

/* Document Card */
.doc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.doc-preview {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #f5f5f5;
}

.doc-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.doc-card:hover .doc-preview-img {
  transform: scale(1.08);
}

.doc-type-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #2b579a, #1e3d6f);
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.doc-type-badge.pdf-badge {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.doc-icon-small {
  width: 35px;
  height: 35px;
  display: block;
}

.doc-info {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.doc-info h3 {
  margin: 0 0 10px 0;
  color: #003366;
  font-size: 1.4em;
}

.doc-info p {
  margin: 0 0 20px 0;
  color: #666;
  font-size: 1em;
  line-height: 1.5;
  flex: 1;
}

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

.preview-doc-btn,
.download-doc-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1em;
}

.preview-doc-btn {
  background: linear-gradient(135deg, #0056b3, #003366);
  color: white;
}

.preview-doc-btn:hover {
  background: linear-gradient(135deg, #0066cc, #0056b3);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,86,179,0.4);
}

.download-doc-btn {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #003366;
}

.download-doc-btn:hover {
  background: linear-gradient(135deg, #ffed4e, #ffd700);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255,215,0,0.4);
}

/* Lightbox for Images */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeInLightbox 0.3s;
}

.lightbox.active {
  display: flex;
}

@keyframes fadeInLightbox {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 50px;
  font-size: 50px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10000;
}

.lightbox-close:hover {
  color: #ffd700;
  transform: rotate(90deg);
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.7);
  animation: zoomIn 0.4s;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Document Preview Modal */
.doc-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeInLightbox 0.3s;
}

.doc-modal.active {
  display: flex;
}

.doc-modal-content {
  background: white;
  width: 90%;
  max-width: 1000px;
  height: 85%;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  animation: slideUpModal 0.4s;
}

@keyframes slideUpModal {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #003366;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10000;
}

.modal-close:hover {
  color: #e74c3c;
  transform: rotate(90deg);
}

#docModalTitle {
  padding: 25px 30px;
  margin: 0;
  background: linear-gradient(135deg, #0056b3, #003366);
  color: white;
  border-radius: 20px 20px 0 0;
  font-size: 1.6em;
}

.doc-modal-body {
  flex: 1;
  padding: 20px;
  overflow: hidden;
}

#docFrame {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .work-gallery {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .work-title-animate {
    font-size: 2.2em;
  }
  
  .filter-tabs {
    gap: 10px;
    padding: 20px 15px;
  }
  
  .filter-btn {
    padding: 10px 20px;
    font-size: 0.95em;
  }
  
  .work-gallery {
    padding: 15px;
  }
  
  .image-card .image-container {
    height: 280px;
  }
  
  .doc-actions {
    flex-direction: column;
  }
  
  .lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 40px;
  }
  
  .doc-modal-content {
    width: 95%;
    height: 90%;
  }
}

