/* ============================================
   CryptoGolfClub - Courses Page Styles
   Golf Course Search & Listing
   ============================================ */

/* --- Page Header --- */
.page-header {
  margin-top: var(--nav-height);
  padding: var(--space-4xl) 0 var(--space-3xl);
  background: linear-gradient(
    135deg,
    #E8F5EE 0%,
    #D4EDDA 100%
  );
  border-bottom: 1px solid #D0D9D4;
  overflow: hidden;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(25, 135, 84, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 1;
}

.header-content .heading-xl {
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, #1A1A1A, #198754);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.heading-sub {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #5A6B63;
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* --- Courses Section --- */
.courses-section {
  padding: var(--space-4xl) 0;
}

/* --- Filter Section --- */
.course-filters {
  margin-bottom: var(--space-4xl);
  padding: var(--space-xl);
  background: #F8FAF9;
  border: 1px solid #E8EDEB;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #5A6B63;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-select {
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid #E8EDEB;
  border-radius: var(--radius-md);
  color: #1A1A1A;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.filter-select:hover {
  border-color: #D0D9D4;
  background: #F8FAF9;
}

.filter-select:focus {
  outline: none;
  border-color: #198754;
  background: #F8FAF9;
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.08);
}

.btn-search {
  width: 100%;
}

@media (max-width: 768px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .btn-search {
    height: 44px;
  }
}

/* --- Results Header --- */
.results-header {
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid #D0D9D4;
}

.results-title {
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: #1A1A1A;
  font-weight: 600;
}

.results-count {
  color: #198754;
  font-weight: 700;
}

/* --- Courses Grid --- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-4xl);
}

/* --- Course Card --- */
.course-card {
  background: #FFFFFF;
  border: 1px solid #E8EDEB;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
}

.course-card:hover {
  border-color: #D0D9D4;
  background: #F8FAF9;
  transform: translateY(-8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.course-card:hover .course-image {
  background: #F8FAF9;
  transform: scale(1.05);
}

.course-image {
  width: 100%;
  height: 200px;
  background: #F8FAF9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  transition: all var(--duration-normal) var(--ease-out);
  border-bottom: 1px solid #E8EDEB;
}

.course-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

.course-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1A1A1A;
  line-height: 1.4;
}

.course-location {
  font-size: 0.9rem;
  color: #5A6B63;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.course-location::before {
  content: '📍';
}

.course-details {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.detail-item {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #F8FAF9;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #5A6B63;
  font-weight: 500;
}

.course-rating {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.stars {
  font-size: 1rem;
  color: #198754;
}

.rating-count {
  font-size: 0.8rem;
  color: #8E9E96;
}

.course-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #198754;
}

.btn-details {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-xl) 0;
  flex-wrap: wrap;
}

.pagination-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 var(--space-sm);
  border: 1px solid #E8EDEB;
  background: #FFFFFF;
  color: #5A6B63;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  border-color: #D0D9D4;
  background: #F8FAF9;
  color: #1A1A1A;
}

.pagination-active {
  background: linear-gradient(135deg, #198754, #0F5132);
  color: #FFFFFF;
  border-color: #198754;
  font-weight: 700;
}

.pagination-dots {
  color: #8E9E96;
  padding: 0 var(--space-xs);
}

/* --- Regional Rankings --- */
.regional-rankings {
  background: #F8FAF9;
  border-top: 1px solid #E8EDEB;
  padding: var(--space-4xl) 0;
}

.ranking-title {
  font-size: clamp(1.3rem, 3vw, 2rem);
  margin-bottom: var(--space-3xl);
  text-align: center;
  color: #1A1A1A;
}

.rankings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
}

.ranking-box {
  background: #FFFFFF;
  border: 1px solid #E8EDEB;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out);
}

.ranking-box:hover {
  border-color: #D0D9D4;
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ranking-region {
  font-size: 1.2rem;
  font-weight: 600;
  color: #198754;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid #E8EDEB;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid #E8EDEB;
  transition: all var(--duration-fast) var(--ease-out);
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-item:hover {
  padding-left: var(--space-sm);
  color: #198754;
}

.ranking-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #198754, #0F5132);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
}

.ranking-name {
  flex: 1;
  color: #5A6B63;
  font-size: 0.95rem;
  line-height: 1.4;
}

.ranking-item:hover .ranking-name {
  color: #198754;
}

/* --- Scroll Reveal Animation --- */
@keyframes revealSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: revealSlideUp 0.6s var(--ease-out) forwards;
  opacity: 0;
}

.reveal.visible {
  opacity: 1;
}

.course-card.reveal {
  animation-delay: calc(var(--reveal-delay, 0) * 50ms);
}

/* Stagger animation delays for cards */
.courses-grid .course-card:nth-child(1) { --reveal-delay: 0; }
.courses-grid .course-card:nth-child(2) { --reveal-delay: 1; }
.courses-grid .course-card:nth-child(3) { --reveal-delay: 2; }
.courses-grid .course-card:nth-child(4) { --reveal-delay: 3; }
.courses-grid .course-card:nth-child(5) { --reveal-delay: 4; }
.courses-grid .course-card:nth-child(6) { --reveal-delay: 5; }
.courses-grid .course-card:nth-child(7) { --reveal-delay: 6; }
.courses-grid .course-card:nth-child(8) { --reveal-delay: 7; }

.rankings-grid .ranking-box:nth-child(1) { animation-delay: 0.1s; }
.rankings-grid .ranking-box:nth-child(2) { animation-delay: 0.2s; }
.rankings-grid .ranking-box:nth-child(3) { animation-delay: 0.3s; }
.rankings-grid .ranking-box:nth-child(4) { animation-delay: 0.4s; }

/* --- Footer Styles --- */
.footer {
  background: #0B3D2E;
  border-top: 1px solid #E8EDEB;
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-4xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #198754, #0F5132);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.footer-logo .logo-accent {
  color: #28A868;
}

.footer-desc {
  font-size: 0.9rem;
  color: #FFFFFF;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  font-size: 0.85rem;
  color: #FFFFFF;
  transition: color var(--duration-fast) var(--ease-out);
}

.social-link:hover {
  color: #28A868;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 0.9rem;
  color: #FFFFFF;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-links a:hover {
  color: #28A868;
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #198754, #0F5132);
  color: #FFFFFF;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  transform: translateY(120px);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
  z-index: 99;
}

.back-to-top.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(25, 135, 84, 0.4);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .courses-section {
    padding: var(--space-3xl) 0;
  }

  .course-filters {
    padding: var(--space-lg);
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .rankings-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .page-header {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: var(--space-md);
    right: var(--space-md);
  }
}

@media (max-width: 480px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }

  .pagination {
    gap: 4px;
  }

  .pagination-btn {
    min-width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  .course-card .course-image {
    height: 160px;
    font-size: 56px;
  }

  .course-content {
    padding: var(--space-md);
  }

  .header-content .heading-xl {
    font-size: 1.8rem;
  }

  .heading-sub {
    font-size: 0.95rem;
  }
}
