/* Card Consistency CSS - LPK Jetbrass Academy Indonesia */

/* Card Container */
.card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Card Image */
.card-img-top {
  height: 200px;
  object-fit: cover;
  width: 100%;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Card Body */
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

/* Card Title */
.card-title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  min-height: 2.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  color: #333;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: #007bff;
}

/* Card Text */
.card-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #666;
}

/* Card Meta Info */
.card-meta {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.75rem;
}

.card-meta i {
  margin-right: 0.25rem;
}

/* Card Badge */
.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

/* Card Button */
.card .btn {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.85rem;
  padding: 0.375rem 0.75rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .card-img-top {
    height: 180px;
  }
  
  .card-title {
    font-size: 1rem;
    min-height: 2.4rem;
  }
  
  .card-text {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .card-img-top {
    height: 160px;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-title {
    font-size: 0.95rem;
    min-height: 2.2rem;
  }
}

/* Hover Effects */
.card.hover-shadow:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Empty State */
.card-empty {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.card-empty h4 {
  margin-bottom: 0.5rem;
  color: #333;
}

.card-empty p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Loading State */
.card-loading {
  opacity: 0.7;
  pointer-events: none;
}

.card-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Grid Layout Consistency */
.row .col-lg-4,
.row .col-md-6,
.row .col-sm-6 {
  margin-bottom: 1.5rem;
}

/* Card Border and Shadow */
.card {
  border: 1px solid rgba(0,0,0,0.125);
  border-radius: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card.border-primary {
  border-color: #007bff !important;
}

/* Card Image Overlay for Date */
.card-img-overlay {
  background: rgba(0,0,0,0.6);
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-date {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
}

.card-date span {
  display: block;
  font-size: 2rem;
}

/* Filter Buttons */
.btn-group .btn {
  border-radius: 20px;
  margin: 0 2px;
  font-size: 0.85rem;
  padding: 0.375rem 0.75rem;
}

.btn-group .btn.active {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

/* Accessibility */
.card:focus-within {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.card-title a:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .card-img-top {
    height: 150px;
  }
}
