/* Portfolio page specific fixes */
.portfolio-preview-notice {
  display: inline-flex;
  align-items: flex-start;
  max-width: 42rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(25, 135, 84, 0.25);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.82);
  color: #365244;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
}

.portfolio-preview-notice i {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  color: #198754;
}

@media (max-width: 575.98px) {
  .portfolio-preview-notice {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Portfolio filter opacity fixes */
.portfolio-page .project-item {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.portfolio-page .project-item.filtered {
  display: none !important;
}

.portfolio-page .project-item.filtered .project-card {
  opacity: 1 !important;
}

/* Portfolio cards use normal flow so content and actions never overlap. */
.portfolio-page .portfolio-grid .container {
  max-width: 1320px;
}

.portfolio-page #projects-container {
  align-items: stretch;
  row-gap: 1.5rem;
}

.portfolio-page .filter-buttons {
  gap: 0.55rem !important;
}

.portfolio-page .filter-btn {
  margin: 0 !important;
  border: 1px solid #8ab99c;
  border-radius: 7px;
  background: #ffffff;
  color: #286542;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.portfolio-page .filter-btn:hover,
.portfolio-page .filter-btn.active {
  border-color: #39805a;
  background: #39805a;
  color: #ffffff;
}

.portfolio-page .project-item {
  display: flex;
}

.portfolio-page .project-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #dce7e1;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(22, 52, 38, 0.07);
  cursor: default;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.portfolio-page .project-card:hover {
  transform: translateY(-5px);
  border-color: #78b994;
  box-shadow: 0 16px 30px rgba(22, 82, 53, 0.14);
}

.portfolio-page .project-header {
  flex: 1;
  padding: 1.4rem 1.4rem 1.15rem;
}

.portfolio-page .project-status {
  position: static;
  min-height: 1.25rem;
  margin-bottom: 0.85rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.portfolio-page .project-status-label {
  color: #39805a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-page .status-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  animation: none;
}

.portfolio-page .project-name {
  margin: 0 0 0.7rem;
  color: #17251f;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
}

.portfolio-page .project-description {
  color: #64736b !important;
  font-size: 0.9rem;
  line-height: 1.65;
}

.portfolio-page .project-footer {
  padding: 0.95rem 1.4rem 1.2rem;
  border-top: 1px solid #edf2ee;
}

.portfolio-page .project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.portfolio-page .project-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.portfolio-page .project-category {
  max-width: 48%;
  color: #65756b;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
}

.portfolio-page .project-direct-link,
.portfolio-page .project-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #39805a;
  border-radius: 7px;
  background: #ffffff;
  color: #286542;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.portfolio-page .project-direct-link:hover,
.portfolio-page .project-direct-link:focus-visible,
.portfolio-page .project-preview-btn:hover,
.portfolio-page .project-preview-btn:focus-visible {
  background: #39805a;
  border-color: #39805a;
  color: #ffffff;
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 576px) {
  .portfolio-page .project-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .portfolio-page .project-category {
    max-width: none;
  }

  .portfolio-page .project-card-actions {
    width: 100%;
    justify-content: stretch;
  }

  .portfolio-page .project-direct-link,
  .portfolio-page .project-preview-btn {
    width: 100%;
  }
}

/* Siri icon visibility fix */
.portfolio-page .siri-icon {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Video responsiveness fix for small screens */
@media (max-width: 768px) {
  .hero-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    display: block !important;
  }
}
