@import url('../../css/style.css');

/* Hostel Requirements Page Styling */

:root {
  --req-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Checklist Cards Grid */
.checklist-container {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .checklist-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .checklist-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Category Card Styling */
.category-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.12);
  border-color: rgba(249, 115, 22, 0.2);
}

.dark .category-card:hover {
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  border-color: rgba(251, 146, 60, 0.25);
}

.category-image-wrap {
  position: relative;
  height: 11rem;
  overflow: hidden;
  border-top-left-radius: 0.95rem;
  border-top-right-radius: 0.95rem;
}

.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .category-image {
  transform: scale(1.06);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 75%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.25rem;
}

/* Checklist Styling */
.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--req-font);
}

/* Each checklist item */
.requirement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

.requirement-item:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 115, 22, 0.35);
  background: var(--bg-body);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.04);
}

.dark .requirement-item:hover {
  border-color: rgba(251, 146, 60, 0.4);
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.06);
}

.requirement-item.checked {
  border-color: var(--border-color);
  background: var(--bg-body);
  opacity: 0.6;
}

.requirement-item .requirement-text {
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--text-primary);
  transition: all 0.2s ease;
  line-height: 1.4;
}

.requirement-item.checked .requirement-text {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 400;
}

/* Custom Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.375rem;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.requirement-item:hover .checkbox-wrapper {
  border-color: var(--hero-bg);
}

.requirement-item.checked .checkbox-wrapper {
  border-color: var(--hero-bg);
  background: var(--hero-bg);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
}

.dark .requirement-item.checked .checkbox-wrapper {
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.4);
}

.checkbox-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: #ffffff;
  stroke-width: 3.5;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.requirement-item.checked .checkbox-icon {
  opacity: 1;
  transform: scale(1);
}

/* Progress widgets styling */
.progress-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.progress-bar-container {
  height: 0.625rem;
  border-radius: 9999px;
  background: var(--border-color);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--hero-bg) 0%, #F59E0B 100%);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-progress-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

.category-progress-badge.completed {
  background: rgba(16, 185, 129, 0.85);
  border-color: rgba(16, 185, 129, 0.9);
}

/* Refined Hero Styles for subpage */
.hero-gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--hero-bg) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .hero-gradient-text {
  background: linear-gradient(135deg, #ffffff 40%, var(--hero-bg) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.flex-1 {
  flex: 1 1 0%;
}

/* Print Styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .theme-toggle,
  nav,
  footer,
  #bg-blobs,
  .progress-card,
  .category-progress-badge,
  .checkbox-wrapper {
    display: none !important;
  }

  .checklist-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }

  .category-card {
    border: 1px solid #ccc !important;
    break-inside: avoid;
    box-shadow: none !important;
    background: white !important;
  }

  .category-image-wrap {
    height: 8rem !important;
  }

  .requirement-item {
    border: none !important;
    border-bottom: 1px solid #eee !important;
    background: transparent !important;
    padding: 0.4rem 0 !important;
  }

  .requirement-item .requirement-text {
    color: black !important;
    text-decoration: none !important;
  }

  .requirement-item::before {
    content: '[ ] ';
    font-family: monospace;
    margin-right: 0.5rem;
    font-weight: bold;
  }

  .requirement-item.checked::before {
    content: '[x] ';
  }
}