/*--------------------------------------------------------------
# Portfolio Section
--------------------------------------------------------------*/
#portfolio {
  padding: 120px 0 80px 0;
  background: #f8f9fa;
}

/* Portfolio Grid */
.portfolio-grid {
  margin-top: 40px;
}

/* Project Card Link Wrapper */
.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.project-card-link:hover {
  text-decoration: none;
}

/* Project Card Styles */
.project-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card-link:hover .project-card {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(55, 125, 255, 0.15);
}

/* Card Header */
.project-card-header {
  position: relative;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.client-badge {
  height: 35px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.project-category {
  background: rgba(55, 125, 255, 0.1);
  color: #377dff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Card Image */
.project-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(74, 173, 189, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card-link:hover .project-overlay {
  opacity: 1;
}

.project-overlay i {
  font-size: 48px;
  color: #fff;
}

/* Card Body */
.project-card-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-card-body h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
}

.project-summary {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.btn-view-project {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f8f9fa;
  color: #4aadbd;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.project-card-link:hover .btn-view-project {
  background: #4aadbd;
  border-color: #4aadbd;
  color: #fff;
  transform: translateX(5px);
}

.btn-view-project i {
  transition: transform 0.3s ease;
  font-size: 1.1rem;
}

.project-card-link:hover .btn-view-project i {
  transform: translateX(3px);
}

/* Project Modal */
.project-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  background-color: #fff;
  margin: 2% auto;
  padding: 0;
  border-radius: 16px;
  width: 95%;
  max-width: 1400px;
  max-height: 94vh;
  overflow: hidden;
  position: relative;
  animation: slideUp 0.4s ease;
}

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

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  background: #fff;
  border: none;
  font-size: 32px;
  font-weight: 300;
  color: #6c757d;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  line-height: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

.modal-close:hover {
  background: #377dff;
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  padding: 50px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 25px;
  max-height: 94vh;
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #377dff;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #2868dd;
}

/* Modal Grid Areas */
.modal-image-area {
  grid-column: 1;
  grid-row: 1;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
}

.modal-partners-area {
  grid-column: 2;
  grid-row: 1;
}

.modal-partners-area.full-width {
  grid-column: 1 / -1;
}

.modal-image-area.full-width {
  grid-column: 1 / -1;
}

.modal-header-area {
  grid-column: 1 / -1;
  grid-row: 2;
}

.modal-summary-area {
  grid-column: 1 / -1;
  grid-row: 3;
}

.modal-goal-area {
  grid-column: 1;
  grid-row: 4;
}

.modal-benefits-area {
  grid-column: 2;
  grid-row: 4;
}

/* Modal Layout */
.modal-image-panel {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content-panel {
  background: #fff;
  padding: 0;
}

/* Modal Header */
.modal-header-content {
  margin-bottom: 0;
  padding: 0;
}

.modal-hero-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-hero-image img {
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: contain;
}

.modal-title-section {
  padding: 0;
  margin-bottom: 25px;
}

.modal-client-info {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.modal-client-logo {
  height: 45px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.modal-category {
  background: rgba(55, 125, 255, 0.1);
  color: #377dff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-left: auto;
}

.modal-title-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  line-height: 1.3;
}

/* Modal Sections */
.modal-section {
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #377dff;
}

.modal-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-section h4 i {
  color: #377dff;
  font-size: 1.3rem;
}

.modal-section p {
  color: #495057;
  line-height: 1.8;
  margin: 0;
}

.modal-goal {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-left-color: #2196F3;
}

.modal-benefits {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-left-color: #4CAF50;
}

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

.modal-benefits li {
  padding-left: 30px;
  margin-bottom: 12px;
  position: relative;
  color: #495057;
  line-height: 1.6;
}

.modal-benefits li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4CAF50;
  font-weight: bold;
  font-size: 1.2rem;
}

.modal-benefits li:last-child {
  margin-bottom: 0;
}

/* Modal Partners */
.modal-partners {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-left-color: #FF9800;
}

.partners-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}

.partner-logo {
  background: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.partner-logo img {
  height: 35px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 1024px) {
  .modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 40px 30px;
  }

  .modal-image-area,
  .modal-partners-area,
  .modal-header-area,
  .modal-summary-area,
  .modal-goal-area,
  .modal-benefits-area {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .modal-image-area {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .modal-content {
    width: 98%;
    margin: 1% auto;
  }

  .modal-body {
    padding: 30px 20px;
    gap: 20px;
  }

  .modal-image-area {
    padding: 20px;
    min-height: 250px;
  }

  .modal-title-section h2 {
    font-size: 1.4rem;
  }

  .modal-section {
    padding: 15px;
  }

  .modal-close {
    width: 35px;
    height: 35px;
    font-size: 28px;
    top: 10px;
    right: 10px;
  }

  .project-card-body h3 {
    font-size: 1.2rem;
  }

  .partners-logos {
    flex-direction: column;
  }

  .partner-logo {
    width: 100%;
    text-align: center;
  }
}

.un-cas-content {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.un-cas-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: #37517e;
  margin: 0 0 10px 0;
  transition: color 0.3s ease;
}

.un-cas:hover .un-cas-content h3 {
  color: #4aadbd;
}

.un-cas-category {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #4aadbd;
  margin: 0 0 15px 0;
  letter-spacing: 0.5px;
}

.un-cas-description {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin: 0 0 20px 0;
  text-align: justify;
}

.un-cas-details {
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  flex-grow: 1;
}

.un-cas-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.un-cas-details li {
  font-size: 13px;
  color: #555;
  padding: 5px 0;
  display: flex;
  justify-content: space-between;
}

.un-cas-details strong {
  color: #37517e;
  margin-right: 10px;
  min-width: 120px;
}

.btn-learn-more {
  display: inline-block;
  padding: 10px 20px;
  background: #4aadbd;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 600;
  align-self: flex-start;
  margin-top: auto;
}

.btn-learn-more:hover {
  background: #36a0b8;
  transform: translateX(5px);
  color: #fff;
}

.btn-portfolio {
  display: inline-block;
  padding: 12px 30px;
  background: #4aadbd;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 600;
}

.btn-portfolio:hover {
  background: #36a0b8;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(74, 173, 189, 0.4);
}

.btn-get-started {
  display: inline-block;
  padding: 12px 40px;
  background: #4aadbd;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  transition: 0.4s;
  font-size: 16px;
  font-weight: 600;
}

.btn-get-started:hover {
  background: #36a0b8;
  color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .portfolio-container {
    grid-template-columns: 1fr;
  }

  .un-cas-img {
    height: 250px;
  }

  .un-cas-content {
    padding: 20px;
  }

  .un-cas-content h3 {
    font-size: 20px;
  }

  .un-cas-description {
    font-size: 13px;
  }

  .un-cas-details li {
    flex-direction: column;
    align-items: flex-start;
  }

  .un-cas-details strong {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .portfolio-container {
    gap: 20px;
  }

  .un-cas-img {
    height: 200px;
  }

  .un-cas-content {
    padding: 15px;
  }

  .un-cas-content h3 {
    font-size: 18px;
  }

  .un-cas-category {
    font-size: 11px;
  }

  .un-cas-description {
    font-size: 12px;
    text-align: left;
  }
}
