/* HEADER */
#header {
  padding: .6rem 1rem;
  border-bottom: 1px solid #ddd;
  width: 100%;
  position: relative;
}

.header-container {
  display: flex;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
}

.logo-icon {
  margin-right: 0.5rem;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Main menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 24px;
  cursor: pointer;
  padding: 0.5rem;
  height: 0;
}

.menu-items {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.menu-items li {
  margin-left: 1rem;
  margin-bottom: 0;
}

.menu-item {
  color: var(--text-color);
  text-decoration: none;
  padding: 0.5rem 0;
  font-weight: 500;
  font-size: 16px;
}

.menu-item:hover {
  color: var(--primary-color);
}

/* Dropdown styles */
.has-dropdown {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.has-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  z-index: 1000;
}

.has-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  margin: 0 !important;
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: 6px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 15px;
  font-weight: 500;
}

.dropdown-menu a:hover {
  background: rgba(214, 40, 40, 0.1);
  color: var(--primary-color);
}

/* Sr-only class for visually hidden elements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* BREADCRUMBS */
.breadcrumbs {
  padding: 1rem 0 0.5rem 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  color: #666;
  font-size: 0.875rem;
  margin: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin: 0 0.5rem;
  color: #ccc;
}

.breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: #666;
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: #efefef;
  padding: 1rem;
  border-radius: 8px;
  max-height: max-content;
  height: max-content;
}

.sidebar-section {
  margin-bottom: 1rem;
}

.sidebar-section strong {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.sidebar-section ul {
  list-style: none;
  padding: 0;
}
.sidebar-section li {
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.sidebar-section a {
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  align-content: center;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 400;
}

.sidebar-section a:hover {
  background: rgba(214, 40, 40, 0.1);
  color: var(--primary-color);
}

.program-count {
  font-size: 12px;
  color: var(--light-color);
}

/* Main container layout */
.main-container {
  display: flex;
  gap: 1.2rem;
  width: 100%;
  padding: 1rem;
}

/* Content area styles */
.content {
  flex: 1;
  min-width: 0;
  max-width: 1600px;
  margin: 0 auto;
}

/* Hero section styles */
.hero-section {
  margin-bottom: 1rem;
}
.hero-section h1 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 2rem;
  text-align: left;
}

.hero-section p {
  color: var(--text-color);
  max-width: 600px;
  line-height: 1.5;
  font-size: 16px;
}

.hero-section-cta {
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  width: 33%;
}
.hero-section-cta h4 {
  margin-bottom: 0.5rem;
  margin-top: 0;
  font-size: 18px;
}
.hero-section-cta p {
  font-size: 14px;
}

/* Programs grid styles */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.program-card {
  overflow: hidden;
  transition: transform 0.2s ease;
  text-decoration: none;
  border: 1px solid #c8c8c8;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  transition: box-shadow 0.2s;
  z-index: 0;
  position: relative;
}
.program-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.featured-program {
  border: 1px solid #676767;
}
.featured-program:hover {
  background: #f9fafb;
}
.featured-badge {
  background: #d1fae5;
  color: #047857;
  padding: 4px 12px;
  border: 1px solid #34d382;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 14px;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}
.program-card img {
  display: block;
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: none;
  margin: 0 auto;
  height: 100px;
  object-fit: contain;
}

.program-card h3{
  margin: 0.5rem 0;
  color: var(--text-color);
}
.program-card p {
  font-weight: 400;
  font-size: 16px;
}

/* Load more button styles */
.load-more-btn {
  display: block;
  margin: 1rem auto;
  background: #fff;
  color: var(--primary-color);
  border-width: 2px;
}
.load-more-btn:disabled {
  background-color: transparent;
  color: var(--text-color) !important;
  cursor: not-allowed;
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-section-cta {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    order: 2;
  }
  .main-container {
    flex-direction: column;
  }
  .programs-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  /* Mobile Menu */
  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    padding: .8rem;
    z-index: 1000;
    display: none;
  }
  .mobile-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .mobile-menu-items li:not(:last-child) { margin: .5rem 0; }
  .mobile-menu-items .primary-btn,
  .mobile-menu-items .secondary-btn {
    width: 100%;
  }
  .menu-toggle {
    display: block;
  }
  .main-navigation .menu-items {
    display: none;
  }
}

/* CTA SECTION */
.cta-section {
  max-width: 800px;
  text-align: center;
  margin: 2rem auto;
  padding: 1.5rem;
  border: 3px solid var(--primary-color);
  border-radius: 12px;
}

.cta-section .badge {
  display: inline-block;
  color: var(--text-color);
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid var(--primary-color);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 1rem;
  background: var(--background-color);
}

.cta-section h2 {
  font-size: 42px;
  color: #1a202c;
  margin: 0 0 20px 0;
}

.cta-section p {
  font-size: 18px;
  color: #4a5568;
  line-height: 1.6;
  margin: 0 auto 32px auto;
  max-width: 700px;
}

.cta-section .btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 14px 32px;
  margin: 0 auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-section .btn:hover {
  transform: translateY(-2px);
}

.cta-section .btn:active {
  transform: translateY(0);
}