/*  FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/*  GLOBAL VARIABLES */
:root {
  --blue: #163C85;
  --blue-hover: #1551cc;
  --yellow: #ffc107;
  --gray: #6c757d;
  --light-gray: #f8f9fc;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
}

/*  RESET & BODY */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  color: #333;
  background-color: #fafafa;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/*  WORKSPACES PAGE CONTAINER */
.workspaces-page {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

/*  SECTION */
.section {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*  CARD GRID - RESPONSIVE GRID LAYOUT */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

/*  CARD DESIGN */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(22, 60, 133, 0.1);
}

/*  SWIPER STYLING */
.swiper {
  width: 100%;
  height: 220px;
  background-color: #f0f0f0;
}

.swiper-slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}

.swiper-slide:hover img {
  transform: scale(1.05);
}

.swiper-pagination-bullet {
  background: var(--white);
  opacity: 0.7;
  transition: var(--transition-fast);
}

.swiper-pagination-bullet-active {
  background: var(--blue);
  opacity: 1;
  transform: scale(1.2);
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--blue);
  opacity: 0;
  transition: var(--transition);
}

.card:hover .swiper-button-next,
.card:hover .swiper-button-prev {
  opacity: 0.8;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  opacity: 1;
}

/*  CARD BODY */
.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  background-color: var(--white);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
  flex: 1;
  transition: var(--transition-fast);
}

.card:hover .card-header h3 {
  color: var(--blue);
}

.rating {
  color: var(--yellow);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.rating i {
  font-size: 0.95rem;
}

.review-count {
  color: #666;
  font-size: 0.85rem;
  font-weight: 400;
}

.location {
  font-size: 0.95rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.location i {
  color: var(--blue);
  font-size: 1rem;
}

/*  BUTTON */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-book {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(22, 60, 133, 0.2);
}

.btn-book::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-book:hover::before {
  width: 300px;
  height: 300px;
}

.btn-book:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 60, 133, 0.3);
}

.btn-book:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(22, 60, 133, 0.2);
}

/*  PAGINATION */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.pagination {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination .page-item {
  display: inline-block;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: var(--gray);
  font-weight: 500;
  transition: var(--transition);
  background: var(--white);
}

.pagination .page-link:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(22, 60, 133, 0.2);
}

.pagination .page-item.active .page-link {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(22, 60, 133, 0.2);
}

.pagination .page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/*  NO RESULTS */
.no-results {
  text-align: center;
  padding: 80px 20px;
  animation: fadeInUp 0.8s ease-out;
}

.no-results i {
  font-size: 4rem;
  color: var(--gray);
  margin-bottom: 24px;
  opacity: 0.5;
}

.no-results p {
  font-size: 1.2rem;
  color: var(--gray);
  font-weight: 500;
}

/*  RESPONSIVE DESIGN */

/*  Large screens (≥1200px) */
@media (min-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 36px;
  }
}

/*  Medium screens (≤992px) */
@media (max-width: 992px) {
  .workspaces-page {
    padding: 32px 0;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
  }
}

/*  Small tablets (≤768px) */
@media (max-width: 768px) {
  .workspaces-page {
    padding: 24px 0;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
  }

  .pagination-wrapper {
    margin-top: 40px;
  }

  .no-results {
    padding: 60px 20px;
  }

  .no-results i {
    font-size: 3rem;
  }

  .no-results p {
    font-size: 1.1rem;
  }
}

/*  Mobile phones (≤576px) */
@media (max-width: 576px) {
  .workspaces-page {
    padding: 20px 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
  }

  .card-body {
    padding: 20px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card-header h3 {
    font-size: 1.1rem;
  }

  .btn-book {
    width: 100%;
    padding: 12px;
  }

  .pagination-wrapper {
    margin-top: 32px;
  }

  .pagination .page-link {
    min-width: 36px;
    height: 36px;
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .no-results {
    padding: 40px 15px;
  }

  .no-results i {
    font-size: 2.5rem;
  }

  .no-results p {
    font-size: 1rem;
  }
}


/*  ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/*  FOCUS STYLES */
.card:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pagination .page-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/*  SMOOTH SCROLLING */
html {
  scroll-behavior: smooth;
}

/*  LOADING STATE */
.card.loading {
  pointer-events: none;
  opacity: 0.6;
}

.card.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}