/**
 * LearnPress Archive Course Styles
 * Matches existing utbildningar styling
 */

.learnpress-archive-courses {
  background: var(--background-color);
}

/* Hero Section - matches single-utbildning-hero */
.courses-archive-hero {
  position: relative;
  height: 600px;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-3xl);
  overflow: hidden;
  margin: 0;
}
.hero-block .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 1;
}

.courses-archive-hero .hero-title {
  font-size: var(--h1-lg-size);
  color: var(--text-white);
  margin: 0;
  line-height: 1.2;
}

.courses-archive-hero .hero-subtitle {
  font-size: var(--text-4xl);
  color: var(--text-white);
  margin: 0;
  opacity: 0.9;
  font-weight: 400;
  margin-top: 1rem;
}

/* Courses Content */
.courses-content {
  background: linear-gradient(
    180deg,
    rgba(248, 248, 240, 1) 70%,
    rgba(255, 255, 255, 1) 70%
  );
  padding: var(--spacing-4xl) 0;
}

/* Search and Filters */
.courses-filters {
  margin-bottom: var(--spacing-4xl);
  display: flex;
  justify-content: center;
}

.search-box {
  max-width: 500px;
  width: 100%;
}

.search-box form {
  display: flex;
  background: white;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.search-box input[type="search"] {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  font-size: var(--text-base);
  outline: none;
}

.search-box button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-box button:hover {
  background: var(--primary-color-dark);
}

.hero-block .hero-subtitle-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  justify-content: center;
}
.hero-block .hero-breadcrumb {
  color: var(--primary-color);
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

.hero-block .hero-breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  opacity: 0.8;
}

.hero-block .hero-breadcrumb a:hover {
  opacity: 1;
}

/* Grid - matches smort-utbildningar-grid */
.smort-utbildningar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 2rem;
  margin-bottom: var(--spacing-4xl);
}

/* Grid for LearnPress archive */
.learnpress-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 2rem;
  margin-bottom: var(--spacing-4xl);
}

/* Pagination */
.courses-pagination {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-4xl);
}

.courses-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 0.25rem;
  background: white;
  color: var(--text-blue);
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.courses-pagination .page-numbers:hover,
.courses-pagination .page-numbers.current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* No courses message */
.smort-utbildningar-no-posts {
  text-align: center;
  color: #6b7280;
  font-size: 1.1rem;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.smort-utbildningar-no-posts h2 {
  font-size: var(--h3-lg-size);
  color: var(--text-blue);
  margin-bottom: var(--spacing-lg);
}

/* Responsive Design */
@media (max-width: 1023px) {
  .courses-archive-hero .hero-title {
    font-size: var(--h1-sm-size);
  }
}

@media (max-width: 768px) {
  .courses-archive-hero {
    height: 50vh;
    min-height: 400px;
  }

  .courses-archive-hero .hero-title {
    font-size: var(--h2-sm-size);
  }

  .courses-archive-hero .hero-subtitle {
    font-size: var(--text-lg);
  }

  .smort-utbildningar-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .search-box {
    margin: 0 1rem;
  }
}

@media (max-width: 480px) {
  .courses-content {
    padding: var(--spacing-2xl) 0;
  }

  .search-box input[type="search"],
  .search-box button {
    padding: 0.75rem 1rem;
  }
}
