/* ================= VARIABLES ================ */
:root {
  --cta-bg: #b0b0b0;
  --cta-bg-hover: #969696;
  --cta-color: #000;
  --cta-color-hover: #000;
  --text-muted-color: #6c757d;
}

/* ================= BUTTONS =================== */
.btn-cta {
  display: inline-block;
  background-color: transparent;
  color: #555;
  border: 1px solid var(--bs-grey, #ccc);
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 4px;
  transition:
          background-color 0.3s ease,
          color 0.3s ease,
          border-color 0.3s ease,
          transform 0.2s ease;
}

.btn-cta:hover,
.btn-cta:focus {
  background-color: var(--bs-grey, #ccc);
  color: #000;
  border-color: var(--bs-grey, #ccc);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ================= CONTAINERS ================= */
.container-all-works {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

/* ================= HEADER =================== */
.works-header {
  margin-bottom: 1.5rem;
}

.works-header .works-title {
  font-weight: 300;
  font-size: 1.75rem;
  margin: 0;
  margin-right: 0.5rem;
}

.works-header p {
  font-size: 0.9rem;
  color: var(--text-muted-color);
  margin: 0;
}

.works-header .header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .works-header .header-row {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .works-header .header-controls {
    width: 100%;
    justify-content: center;
  }
}

/* ================= FILTER / SORTER ========== */
.works-sorter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.works-sorter form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.works-sorter .form-select-sm {
  min-width: 160px;
  border: 1px solid #ddd;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}

.works-sorter .btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

/* ================= CARDS ===================== */
.card {
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.card-img-top {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* ================= CALL TO ACTION ================= */
a.call-to-action {
  text-decoration: none;
  color: var(--cta-bg);
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

a.call-to-action:hover {
  color: var(--cta-bg-hover);
}

/* ================== CTA BUTTONS FROM EXHIBITIONS ================== */
.btn-cta {
  display: inline-block;
  background-color: transparent;
  color: #555;
  border: 1px solid #ccc;
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  font-size: 0.75rem;
  text-decoration: none;
  border-radius: 4px;
  transition:
          background-color 0.3s ease,
          color 0.3s ease,
          border-color 0.3s ease,
          transform 0.2s ease;
}

.btn-cta:hover,
.btn-cta:focus {
  background-color: #ccc;
  color: #000;
  border-color: #ccc;
  transform: translateY(-2px);
  text-decoration: none;
}

/* ================= GRID / MASONRY =========== */
#masonry-grid .col {
  margin-bottom: 1rem;
}

/* ================= SINGLE WORK PAGE ============ */
.container-work {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.work-image-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-image-container img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.work-details {
  margin-top: 2rem;
}

.work-details .card {
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

.work-details h1 {
  font-size: 1.75rem;
  font-weight: 200;
  margin-bottom: 1rem;
}

.work-details p {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.work-details svg {
  margin-right: 0.5rem;
  color: #555;
}

.work-status {
  margin-top: 1.5rem;
}

.work-for-sale {
  display: inline-block;
  background-color: #28a745;
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
}

.work-for-sale:hover {
  background-color: #218838;
  color: white;
}

.work-sold {
  display: inline-block;
  background-color: #6c757d;
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 4px;
}

.cta-back-all-works {
  display: inline-block;
  margin: 2rem auto 0 auto;
  text-decoration: none;
  color: #555;
  font-weight: 500;
  text-align: center;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.cta-back-all-works:hover {
  color: #000;
  background-color: #f0f0f0;
}

/* ================= RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 576px) {
  .works-header {
    text-align: center;
  }
  .works-header .works-title {
    font-size: 1.5rem;
  }
  .card-img-top {
    height: 200px;
  }
  .works-sorter .form-select-sm, .works-sorter .btn-sm {
    width: 100%;
  }
}

/* ================= SINGLE WORK PAGE RESPONSIVE (TABLET) ============ */
@media (max-width: 992px) {
  .container-work .row.g-5 {
    flex-direction: column;
  }

  .work-image-container,
  .work-details {
    width: 100%;
    margin-top: 0;
  }

  .work-details {
    margin-top: 2rem;
  }

  .work-details .card {
    padding: 1.5rem;
  }

  .work-image-container img {
    max-height: 60vh;
    margin-top: 2rem;
  }

  .work-for-sale {
    text-align: center;
  }
}
