/* Project Card Component Styles */
/* ArchCaps E-Library - Reusable Project Card UI */

/* Projects Section */
.projects-section {
  padding: 1.5rem 0.75rem;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-scroll-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  max-width: 1700px;
  margin: 0 auto;
  padding: 2rem 4rem;
}

.projects-scroll-wrapper::before,
.projects-scroll-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 150px;
  z-index: 5;
  pointer-events: none;
}

.projects-scroll-wrapper::before {
  left: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 246, 233, 0.95) 0%,
    rgba(255, 246, 233, 0) 100%
  );
  opacity: var(--left-fade-opacity, 0);
  transition: opacity 0.3s ease;
}

.projects-scroll-wrapper::after {
  right: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 246, 233, 0) 0%,
    rgba(255, 246, 233, 0.95) 100%
  );
  opacity: var(--right-fade-opacity, 1);
  transition: opacity 0.3s ease;
}

.projects-scroll {
  display: flex;
  gap: 1.5rem;
  padding: 2rem 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.projects-scroll::-webkit-scrollbar {
  display: none;
}

/* Main Project Card */
.project-card {
  flex: 0 0 auto;
  width: 320px;
  min-height: 500px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  position: relative;
  overflow: hidden;
  justify-content: flex-start;
  text-align: left;
  margin: 1rem 0.5rem;
  z-index: 1;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Grid Layout Overrides - REMOVED
   Grid styles are now handled in individual page files */

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Project Card Media Section */
.project-card__media {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card__media img {
  transform: scale(1.05);
}

/* Favorite Button */
.project-card__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: all 0.3s ease;
}

.project-card__fav:hover {
  background: #f8f8f8;
  transform: scale(1.1);
}

.project-card__fav.saved {
  background: rgba(255, 255, 255, 0.9);
}

.project-card__fav.saved i {
  color: #fcd34d;
  animation: saveFill 0.3s ease forwards;
}

@keyframes saveFill {
  0% {
    color: #6b7280;
    transform: scale(1);
  }
  50% {
    color: #fcd34d;
    transform: scale(1.1);
  }
  100% {
    color: #fcd34d;
    transform: scale(1);
  }
}

.project-card__fav i {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.3s ease;
}

.project-card__fav:hover i {
  color: #fcd34d;
}

/* Admin menu button */
.project-card__media .project-card__menu-wrapper {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
}

.project-card__media .project-card__menu {
  position: relative;
  top: 0;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.18),
    0 0 0 2px #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 20;
  outline: 2px solid #fff;
}

.project-card__menu i {
  color: #374151;
  font-size: 1rem;
  line-height: 1;
}

.project-card__menu:hover {
  transform: scale(1.08);
  background: #f9fafb;
}

/* Category Badge */
.project-card__category {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: linear-gradient(90deg, #2e4c8c 20%, #fa2d1a 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: 'Roboto', sans-serif !important;
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.project-card__category:hover,
.project-card__category:focus,
.project-card__category:active,
.project-card__category:visited {
  transform: translateY(-2px);
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Project Card Content */
.project-card__content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: flex-start;
}

.project-card__title {
  margin: 0 0 8px 0;
  font-weight: 800;
  font-size: 1.2rem;
  color: #003049;
  line-height: 1.2;
  transition: color 0.3s ease;
  font-family: 'Poppins', sans-serif !important;
}

.project-card:hover .project-card__title {
  color: #c1121f;
}

.project-card__meta {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 4px;
  font-family: 'Roboto', sans-serif !important;
}

.project-card__published {
  color: #6c757d;
  font-size: 0.85rem;
  line-height: 1.35;
  margin-bottom: 8px;
  font-family: 'Roboto', sans-serif !important;
}

.project-card__desc {
  margin: 0 0 12px 0;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.45;
  flex-grow: 1;
  max-height: 180px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  -webkit-box-orient: vertical;
  font-family: 'Inter', sans-serif !important;
}

/* Tags */
.project-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-card__tag {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  transition: transform 0.2s ease;
  font-family: 'Inter', sans-serif !important;
}

.project-card__tag:hover {
  transform: scale(1.05);
}

@media (max-width: 767.98px) {
  .project-card__tags {
    gap: 4px;
  }

  .project-card__tag {
    padding: 4px 8px;
    font-size: 0.66rem;
    line-height: 1.1;
  }
}

.project-card__tag:hover {
  transform: scale(1.05);
}

.project-card__tag--primary {
  background: #c1121f;
  box-shadow: 0 2px 4px rgba(193, 18, 31, 0.2);
}

.project-card__tag--secondary {
  background: #669bbc;
  box-shadow: 0 2px 4px rgba(102, 155, 188, 0.2);
}

.project-card__tag--dark {
  background: #003049;
  box-shadow: 0 2px 4px rgba(0, 48, 73, 0.2);
}

/* Action Button */
.project-card__btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-transform: none;
  background: linear-gradient(90deg, #780000 0%, #c1121f 50%, #780000 100%);
  margin-top: auto;
  margin-bottom: 16px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(193, 18, 31, 0.3);
}

.project-card__btn:hover {
  background: linear-gradient(90deg, #5a0000 0%, #a00f18 50%, #5a0000 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(193, 18, 31, 0.4);
}

.project-card__btn:active {
  transform: translateY(0);
}

.project-card__btn--admin {
  background: linear-gradient(90deg, #0f4c81 0%, #2368a2 50%, #0f4c81 100%);
  box-shadow: 0 4px 12px rgba(35, 104, 162, 0.3);
}

.project-card__btn--admin:hover {
  background: linear-gradient(90deg, #0c406d 0%, #1d5888 50%, #0c406d 100%);
  box-shadow: 0 6px 20px rgba(35, 104, 162, 0.4);
}

/* Navigation Arrows */
.nav-arrows-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
  padding: 15px 0;
}

.nav-arrow {
  width: 45px;
  height: 45px;
  background: #c1121f;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(193, 18, 31, 0.3);
}

.nav-arrow:hover {
  background: #780000;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(193, 18, 31, 0.4);
}

.nav-arrow:active {
  transform: scale(0.95);
}

.nav-arrow i {
  font-size: 1.2rem;
  color: #ffffff;
  font-weight: bold;
}

.nav-arrow.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  background: #c1121f;
}

.nav-arrow.disabled:hover {
  transform: none;
  background: #c1121f;
  box-shadow: 0 4px 15px rgba(193, 18, 31, 0.3);
}

/* Grid View Override - Ensure grid cards use flexible width */
.projects-grid .project-card {
  width: 100% !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  min-height: 400px;
}

/* Responsive Design - Horizontal scroll only */
/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1199.98px) and (min-width: 992px) {
  .projects-scroll-container {
    padding: 2rem 2rem;
  }

  .project-card {
    width: 310px;
    min-height: 480px;
  }

  /* Grid cards on tablet landscape */
  .projects-grid .project-card {
    width: 100% !important;
    min-height: 380px !important;
  }

  .project-card__media {
    height: 170px;
  }

  .project-card__title {
    font-size: 1.15rem;
    margin-bottom: 6px;
  }

  .project-card__meta,
  .project-card__published {
    font-size: 0.9rem;
  }

  .project-card__desc {
    font-size: 0.92rem;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }

  .project-card__btn {
    padding: 12px 18px;
    font-size: 0.95rem;
    margin-bottom: 14px;
    border-radius: 8px;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991.98px) {
  .projects-scroll-container {
    padding: 1.5rem 1rem;
  }

  .project-card {
    width: 290px;
    min-height: 460px;
    margin: 0.75rem 0.5rem;
  }

  /* Grid cards on tablet portrait */
  .projects-grid .project-card {
    width: 100% !important;
    min-height: 360px !important;
    margin: 0 !important;
  }

  .project-card__media {
    height: 160px;
  }

  .project-card__content {
    padding: 14px;
  }

  .project-card__title {
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .project-card__meta {
    font-size: 0.88rem;
    margin-bottom: 2px;
  }

  .project-card__published {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .project-card__desc {
    font-size: 0.88rem;
    margin-bottom: 10px;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }

  .project-card__fav,
  .project-card__media .project-card__menu {
    width: 34px;
    height: 34px;
    top: 10px;
    right: 10px;
  }

  .project-card__fav i,
  .project-card__media .project-card__menu i {
    font-size: 0.9rem;
  }

  .project-card__category {
    font-size: 0.8rem;
    padding: 5px 10px;
    left: 10px;
    bottom: 10px;
  }

  .project-card__btn {
    padding: 11px 16px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .nav-arrow {
    width: 40px;
    height: 40px;
  }

  .nav-arrow i {
    font-size: 1rem;
  }
}

/* Mobile (576px - 767px) - GRID VIEW OPTIMIZED */
@media (max-width: 767.98px) {
  .projects-scroll-container {
    padding: 1rem 0.75rem;
  }

  .projects-scroll {
    gap: 1.2rem;
    padding: 1rem 0.5rem;
  }

  /* Carousel-style cards (fixed width) */
  .project-card {
    width: 260px;
    min-height: 400px;
    margin: 0.5rem 0.25rem;
    border-radius: 13px;
  }

  /* Grid-based cards (flexible width) - view-all.php uses this */
  .projects-grid .project-card {
    width: auto;
    min-height: 360px;
    margin: 0;
    border-radius: 12px;
  }

  .project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  }

  .project-card__media {
    height: 140px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  .project-card__content {
    padding: 11px;
  }

  .project-card__title {
    font-size: 0.9rem;
    margin-bottom: 3px;
    line-height: 1.25;
    font-weight: 700;
  }

  .project-card__meta {
    font-size: 0.75rem;
    margin-bottom: 1px;
    line-height: 1.2;
  }

  .project-card__published {
    font-size: 0.7rem;
    margin-bottom: 3px;
    line-height: 1.2;
  }

  .project-card__desc {
    font-size: 0.75rem;
    margin-bottom: 6px;
    line-height: 1.35;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .project-card__fav,
  .project-card__media .project-card__menu {
    width: 30px;
    height: 30px;
    top: 7px;
    right: 7px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  }

  .project-card__fav i,
  .project-card__media .project-card__menu i {
    font-size: 0.75rem;
  }

  .project-card__category {
    font-size: 0.7rem;
    padding: 3px 7px;
    left: 7px;
    bottom: 7px;
  }

  .project-card__btn {
    padding: 9px 12px;
    font-size: 0.8rem;
    margin-bottom: 9px;
    border-radius: 6px;
  }

  .nav-arrows-container {
    gap: 10px;
    margin-top: 10px;
  }

  .nav-arrow {
    width: 34px;
    height: 34px;
  }

  .nav-arrow i {
    font-size: 0.85rem;
  }
}

/* Extra Small Mobile (<576px) */
@media (max-width: 575.98px) {
  .projects-scroll-container {
    padding: 0.75rem 0.5rem;
  }

  .projects-scroll {
    gap: 1rem;
    padding: 0.75rem 0.25rem;
  }

  .project-card {
    width: 220px;
    min-height: 340px;
    margin: 0.4rem 0.15rem;
  }

  .projects-grid .project-card {
    width: auto;
    min-height: 320px;
    border-radius: 10px;
  }

  .project-card__media {
    height: 130px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }

  .project-card__content {
    padding: 9px;
  }

  .project-card__title {
    font-size: 0.85rem;
    margin-bottom: 2px;
  }

  .project-card__meta {
    font-size: 0.7rem;
    margin-bottom: 1px;
  }

  .project-card__published {
    font-size: 0.65rem;
    margin-bottom: 2px;
  }

  .project-card__desc {
    font-size: 0.7rem;
    margin-bottom: 4px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .project-card__fav,
  .project-card__media .project-card__menu {
    width: 28px;
    height: 28px;
    top: 6px;
    right: 6px;
  }

  .project-card__fav i,
  .project-card__media .project-card__menu i {
    font-size: 0.7rem;
  }

  .project-card__category {
    font-size: 0.65rem;
    padding: 2px 6px;
    left: 6px;
    bottom: 6px;
  }

  .project-card__btn {
    padding: 8px 10px;
    font-size: 0.75rem;
    margin-bottom: 8px;
    border-radius: 5px;
  }

  .nav-arrow {
    width: 30px;
    height: 30px;
  }

  .nav-arrow i {
    font-size: 0.75rem;
  }
}

/* Grid responsive styles are now handled in individual page files */

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card {
  animation: fadeInUp 0.5s ease forwards;
}

.project-card:nth-child(1) {
  animation-delay: 0.1s;
}
.project-card:nth-child(2) {
  animation-delay: 0.2s;
}
.project-card:nth-child(3) {
  animation-delay: 0.3s;
}
.project-card:nth-child(4) {
  animation-delay: 0.4s;
}
.project-card:nth-child(5) {
  animation-delay: 0.5s;
}
