/* ==========================================================================
   AI Courses Main CSS - Complete stylesheet for AI Learning Center
   Includes both general site styles and course-specific styles
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES & GLOBAL SETTINGS
   ========================================================================== */
:root {
  --primary-color: #4F46E5;
  --secondary-color: #7C3AED;
  --text-color: #fff;
  --background-start: #4F46E5;
  --background-end: #7C3AED;
  --glass-background: rgba(255, 255, 255, 0.1);
  --glass-background-hover: rgba(255, 255, 255, 0.2);
  --dropdown-background: rgba(60, 52, 190, 0.9);
  --transition-speed: 0.3s;
  
  /* Course-specific colors */
  --course-tag-free: #4ade80;
  --course-tag-member: #f59e0b;
  --course-tag-premium: #ec4899;
  
  /* Card flip transition duration */
  --card-flip-duration: 0.6s;
}

/* ==========================================================================
   2. BASE STYLES
   ========================================================================== */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  background: linear-gradient(135deg, var(--background-start), var(--background-end));
  display: flex;
  flex-direction: column;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

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

/* Google AdSense annotations customization */
.google-anno,
.google-anno-t {
  color: white !important;
  text-decoration-color: rgba(255, 255, 255, 0.6) !important;
}

.google-anno svg {
  fill: white !important;
}

/* ==========================================================================
   3. BANNER COMPONENT
   ========================================================================== */
.banner-container {
  width: 100%;
  background: #0D0C1D;
  position: relative;
  overflow: hidden;
}

.banner-content {
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.banner-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 0.875rem;
  transition: opacity 0.3s ease;
}

.banner-link:hover {
  opacity: 0.9;
  color: var(--text-color);
}

/* ==========================================================================
   4. NAVIGATION & MOBILE MENU
   ========================================================================== */
.nav-container {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  height: 4rem;
}

/* Base state - mobile first */
.nav-links {
  display: none;
}

.auth-buttons {
  display: none;
}

/* Navigation Links */
.nav-link {
  padding: 0.5rem 0.75rem;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.nav-link:hover {
  background-color: var(--glass-background-hover);
  color: var(--text-color);
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Desktop Dropdown Styles */
.nav-item.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.dropdown-arrow {
  margin-left: 0.4em;
  font-size: 0.7em;
  transition: transform var(--transition-speed) ease;
  display: inline-block;
  vertical-align: middle;
}

.nav-dropdown-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 200px;
  padding: 0.5rem 0;
  background: var(--dropdown-background);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity var(--transition-speed) ease,
              visibility var(--transition-speed) ease,
              transform var(--transition-speed) ease;
}

.nav-item.nav-dropdown:hover > .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-item.nav-dropdown:hover > .nav-dropdown-toggle .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-item {
  display: block;
  padding: 0.6rem 1.2rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus,
.nav-dropdown-item.active {
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-decoration: none;
}

/* Mobile Menu Button */
.mobile-menu-button {
  display: block;
  background: none;
  border: none;
  color: var(--text-color);
  padding: 0.5rem;
  cursor: pointer;
  transition: opacity var(--transition-speed);
  z-index: 51;
}

.mobile-menu-button:hover {
  opacity: 0.8;
}

/* Mobile Menu Panel */
.mobile-menu {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  background: #0D0C1D;
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform var(--transition-speed) ease-out;
  z-index: 49;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  transform: translateY(0);
  display: block;
}

/* Mobile menu general link styling */
.mobile-menu .nav-link:not(.sub-link),
.mobile-menu .mobile-submenu-toggle {
  display: block;
  padding: 0.9rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  color: var(--text-color);
}

.mobile-menu > *:not(.mobile-menu-section):not(.auth-buttons-mobile):last-of-type {
  border-bottom: none;
}

.mobile-menu .mobile-menu-section:last-of-type > .mobile-submenu-toggle {
  border-bottom: none;
}

/* Mobile Submenu Styles */
.mobile-submenu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-submenu-toggle .dropdown-arrow {
  transition: transform var(--transition-speed) ease;
  font-size: 0.9em;
}

.mobile-submenu-toggle[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.mobile-submenu {
  background-color: rgba(0, 0, 0, 0.1);
  padding-left: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

.mobile-submenu .sub-link {
  display: block;
  padding: 0.75rem 1.5rem 0.75rem 2.5rem;
  text-align: left;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.mobile-submenu .sub-link:last-child {
  border-bottom: none;
}

.mobile-submenu .sub-link:hover,
.mobile-submenu .sub-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

/* Mobile auth buttons */
.mobile-menu .auth-buttons-mobile {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  margin-top: 1rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 1rem;
}

.auth-buttons-mobile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.75rem;
}

/* Logo Styling */
.nav-logo-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0.25rem 0;
  margin-right: 1rem;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  max-height: calc(100% - 0.5rem);
  transition: height var(--transition-speed) ease;
  display: block;
}

/* ==========================================================================
   5. BUTTON STYLES
   ========================================================================== */
.button {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.button-primary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: 1px solid transparent;
}

.button-primary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.button-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
}

.button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.mobile-menu .button {
  width: 100%;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
}

.mobile-menu .button-primary {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.mobile-menu .button-primary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-menu .button-outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

.mobile-menu .button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   6. HERO SECTION - COURSE-SPECIFIC
   ========================================================================== */
.course-hero {
  padding: 4rem 1rem 2rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.course-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('/images/courses/hero-pattern.svg') center/cover;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0;
    background: linear-gradient(135deg, #FFFFFF 30%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin: 1.5rem auto 0;
    max-width: 55ch;
    color: var(--text-secondary);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  font-size: 1rem;
  font-weight: 500;
  transition: all var(--transition-speed);
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.stat-item i {
  font-size: 1.2rem;
  color: var(--course-tag-free);
}

/* ==========================================================================
   7. FILTER SECTION
   ========================================================================== */
.course-filters-section {
  margin-top: 1rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.filters-container {
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.filters-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.search-container {
  display: flex;
  flex: 1 1 300px;
  min-width: 0;
}

.search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  color: var(--text-color);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-container .button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
}

.filter-group label {
  font-size: 0.9rem;
  white-space: nowrap;
}

.filter-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  color: var(--text-color);
  padding: 0.75rem 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  padding-right: 2.5rem;
  min-width: 140px;
}

.filter-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
}

.courses-section {
  padding: 0 1rem;
  margin-bottom: 4rem;
}

.courses-count {
  text-align: center;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.courses-count #filtered-count {
  font-weight: bold;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}



.course-card-inner {
  position: relative;
  width: 100%;
  height: 100%; /* Ensures inner takes full height of course-card */
  transition: transform var(--card-flip-duration);
  transform-style: preserve-3d;
}

.course-card-inner.flipped {
  transform: rotateY(180deg);
}

/* Common styles for front and back */
.course-card-front,
.course-card-back {
  position: absolute;
  width: 100%;
  height: 100%; /* Ensures front/back take full height of course-card-inner */
  backface-visibility: hidden;
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* For Safari */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  overflow: hidden; /* Important for keeping content within card boundaries */
  display: flex;
  flex-direction: column; /* Key for vertical layout of image and content */
}

/* Front card */
.course-card-front {
  z-index: 2;
}

/* Back card */
.course-card-back {
  transform: rotateY(180deg);
  padding: 1.5rem;
  overflow-y: auto; /* Allows scrolling if back content is too long */
}

/* In your Section 8: COURSES GRID & CARDS */

.course-image {
  position: relative;
  /* OLD: height: 170px; */
  height: 300px; /* << INCREASE THIS VALUE - Try values like 200px, 220px, 250px.
                       If your cards are typically around 300px wide, a height closer to 300px
                       will make the image container almost square. */
  width: 100%;
  overflow: hidden;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This remains the same */
  transition: transform var(--transition-speed) ease;
}

/* You MIGHT need to adjust the overall card height if the image takes up more space */
.course-card {
  /* OLD: height: 450px; */
  height: 580px; /* << Example: Increase this if you increased .course-image height significantly */
  width: 100%;
  perspective: 1000px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.course-card:hover .course-image img {
  transform: scale(1.05);
}

/* Base tag style */
.course-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #000;
  font-weight: bold;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  z-index: 3;
}

/* FREE tag style */
.course-tag-free {
  background-color: var(--course-tag-free);
}

/* PRO tag style */
.course-tag-pro {
  background-color: var(--course-tag-premium);
  color: #fff; /* White text for better contrast */
}

/* Course Content */
.course-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1; /* Allows this section to grow and fill remaining card space */
  overflow: hidden; /* Prevents content from breaking out if too large */
}

.course-title { /* CORRECTED SELECTOR (was 'course-title') */
  font-size: 1.15rem; /* Adjust as needed */
  font-weight: 700;
  line-height: 1.4; /* Adjust for font size for 2 lines */
  height: calc(1.4em * 2); /* Fixed height for 2 lines of text */
  margin-bottom: 0.75rem; /* Consistent spacing */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis; /* Shows '...' for overflowed text */
}

.course-description {
  font-size: 0.9rem; /* Adjust as needed */
  line-height: 1.5; /* Adjust for font size for 3 lines */
  color: rgba(255, 255, 255, 0.85);
  height: calc(1.5em * 3); /* Fixed height for 3 lines of text */
  margin-bottom: 1rem; /* Consistent spacing */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis; /* Shows '...' for overflowed text */
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 1rem; /* Spacing before the button */
  gap: 0.5rem;
}

.course-meta span {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.8);
}

.flip-button {
  background: transparent;
  border: none;
  color: var(--text-color);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color var(--transition-speed);
  font-size: 0.9rem;
  align-self: center;
  margin-top: auto; /* Pushes button to the bottom of .course-content if space allows */
}

.flip-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Back card content */
.course-card-back .course-title { /* Ensure back card title also respects potential truncation */
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    max-height: calc(1.4em * 2); /* Max 2 lines */
    margin-bottom: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    /* display: -webkit-box; etc. not strictly needed if just max-height + overflow */
}

.instructor-info {
  margin: 0.5rem 0 1rem; /* Adjusted margin */
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
}

.instructor-info p {
  margin: 0.25rem 0 0.5rem; /* Adjusted margin */
}

.instructor-info small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box; /* Optional: truncate instructor bio if too long */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-full-description {
  margin: 0 0 1rem; /* Adjusted margin */
  line-height: 1.5;
  font-size: 0.9rem; /* Adjusted for consistency */
  max-height: calc(1.5em * 4); /* Example: limit to 4 lines, adjust as needed */
  overflow-y: auto; /* Or hidden with ellipsis if preferred for fixed look */
}

.course-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem; /* Adjusted margin */
}

.course-category {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
}

.course-actions {
  margin-top: auto; /* Pushes actions to the bottom of the card back */
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.course-actions .button {
  flex: 1;
}

.back-flip-button {
  color: rgba(255, 255, 255, 0.8);
}

/* No results message */
.no-results {
  text-align: center;
  padding: 3rem;
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 2rem auto;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.no-results i {
  color: rgba(255, 255, 255, 0.5);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.no-results h3 {
  margin-bottom: 0.5rem;
}

.no-results p {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.no-results .button {
  min-width: 200px;
}

/* ==========================================================================
   9. WHY LEARN SECTION
   ========================================================================== */
.why-learn-section {
  padding: 4rem 1rem;
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  margin-bottom: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  font-weight: 700;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.benefit-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--transition-speed);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.benefit-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.benefit-card p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ==========================================================================
   10. FAQ SECTION
   ========================================================================== */
.faq-section {
  margin-bottom: 4rem;
  padding: 0 1rem;
}

.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  margin-bottom: 1rem;
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
}

.accordion-button {
  padding: 1.25rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.05);
  border: none;
  position: relative;
  width: 100%;
  text-align: left;
  transition: all var(--transition-speed);
}

.accordion-button:not(.collapsed) {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.accordion-button::after {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 1.25rem;
  transition: transform 0.3s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 1.5rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.accordion-body p {
  margin-bottom: 0;
}

.accordion-body a {
  color: var(--course-tag-free);
  text-decoration: underline;
  transition: opacity var(--transition-speed);
}

.accordion-body a:hover {
  opacity: 0.8;
}

/* ==========================================================================
   11. CTA SECTION
   ========================================================================== */
.cta-section {
  padding: 0 1rem;
  margin-bottom: 4rem;
}

.cta-content {
  max-width: 768px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem;
  background: linear-gradient(135deg, 
    rgba(79, 70, 229, 0.2), 
    rgba(124, 58, 237, 0.2)
  );
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

.cta-content .button {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  min-width: 200px;
}

/* ==========================================================================
   12. NEWSLETTER SECTION
   ========================================================================== */
.newsletter-section {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  margin: 0 1rem 4rem;
  border-radius: 1rem;
  color: white;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.newsletter-section p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

#newsletter-container {
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
.footer {
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  padding: 4rem 0 0;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-section h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.footer-links a:hover {
  color: var(--text-color);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  transition: all var(--transition-speed);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: var(--text-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-bottom-links a,
.footer-bottom-links button {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  transition: color var(--transition-speed);
}

.footer-bottom-links a:hover,
.footer-bottom-links button:hover {
  color: var(--text-color);
}

/* ==========================================================================
   14. UTILITY CLASSES
   ========================================================================== */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ==========================================================================
   15. ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.courses-grid {
  animation: fadeIn 0.5s ease-out;
}

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

.hero-stats .stat-item {
  animation: slideInUp 0.5s ease-out forwards;
  opacity: 0;
}

.hero-stats .stat-item:nth-child(1) { animation-delay: 0.1s; }
.hero-stats .stat-item:nth-child(2) { animation-delay: 0.2s; }
.hero-stats .stat-item:nth-child(3) { animation-delay: 0.3s; }

/* ==========================================================================
   16. RESPONSIVE ADJUSTMENTS
   ========================================================================== */
/* Small screens (mobile) */
@media (max-width: 640px) {
  .banner-link {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .course-filters-section {
    margin-bottom: 2rem;
  }
  
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-container {
    flex: 1 1 auto;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select {
    flex: 1;
  }
  
  #reset-filters {
    width: 100%;
  }
  
  .courses-grid {
    grid-template-columns: 1fr;
  }
  
  .benefit-card {
    padding: 1.5rem;
  }
  
  .benefit-icon {
    width: 60px;
    height: 60px;
  }
  
  .cta-content {
    padding: 2rem 1.5rem;
  }
  
  .newsletter-section {
    padding: 2rem 1.5rem;
    margin: 0 0.5rem 3rem;
  }
  
  .newsletter-section h2 {
    font-size: 1.75rem;
  }

  /* Mobile Modal Adjustments */
  .modal-dialog {
    margin: 1rem auto;
    width: calc(100% - 2rem);
  }
  
  .modal-content {
    border-radius: 1rem;
  }
  
  .modal-body {
    padding: 1.25rem;
    font-size: 1rem;
  }
  
  .modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .modal-footer .button {
    width: 100%;
  }
  
  .modal-footer .ms-auto {
    margin-left: 0 !important;
  }
}

/* Tablets and smaller screens */
@media (max-width: 859px) {
  .nav-links,
  .auth-buttons {
    display: none;
  }
  
  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }
  
  .nav-container {
    height: 4rem;
  }
  
  .mobile-menu {
    top: 3.5rem;
    max-height: calc(100vh - 3.5rem);
  }

  .nav-logo-img {
    height: 64px;
  }
  
  .nav-logo-link {
    margin-right: 0.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .footer-bottom-links {
    justify-content: center;
  }
}



/* Desktop Navigation */
@media (min-width: 860px) {
  .mobile-menu-button {
    display: none;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
    margin-right: auto;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
  }
  
  .nav-content {
    height: 4rem;
  }

  .nav-logo-img {
    height: 64px;
  }
  
  .nav-logo-link {
    margin-right: 1rem;
  }
}

/* Larger Desktops */
@media (min-width: 992px) {
  .nav-links {
    gap: 1rem;
  }
  
  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
  
  .auth-buttons {
    gap: 0.75rem;
  }
  
  .button {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
  
  .footer-grid {
    gap: 3rem 4rem;
  }
  
  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra Large Screens */
@media (min-width: 1280px) {
  .nav-content, .footer-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
}

/* ==========================================================================
   17. CARD FLIP EFFECTS & HOVER ENHANCEMENTS
   ========================================================================== */
/* Card flip hover trigger */
.course-card:hover .course-card-inner:not(.flipped) {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Focus states for accessibility */
.search-input:focus,
.filter-select:focus,
.button:focus,
.flip-button:focus {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

/* Better card shadows */
.course-card-front,
.course-card-back,
.filter-select,
.search-input,
.benefit-card {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Glass effect enhancement */
.course-card-front,
.course-card-back,
.filters-container,
.no-results,
.newsletter-section,
.footer,
.accordion-item,
.nav-container {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.profile-menu {
    background: #eb7113!important;
}
  
.profile-item.logout {
    color: white!important;
}

.profile-icon, .submit-icon {
    width: 2.5rem!important;
    padding: 10px!important;
}
