/* Modern Design System */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #0f172a;
  --accent-color: #38bdf8;
  --background-light: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background-light);
  color: var(--text-main);
  margin: 0;
  line-height: 1.6;
}

/* Header */
header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  color: var(--white);
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

header a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

header a:hover {
  opacity: 0.9;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.header-nav a {
  font-weight: 500;
  color: var(--white);
}

.header-nav a:hover {
  color: var(--accent-color);
}

/* Page Container */
.page-container {
  padding-top: 90px;
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
  padding-bottom: 2rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 90px;
}

.search-container {
  margin-bottom: 1.5rem;
}

.search-container input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background-color: #f1f5f9;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background-color: #e2e8f0;
  color: var(--text-main);
}

.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Main Content */
.main {
  flex: 1;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #f1f5f9;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h2 {
  font-size: 1.25rem;
  margin: 1rem 1rem 0.5rem;
  color: var(--text-main);
}

.card p {
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.tag {
  margin: 0 1rem 1rem;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #eff6ff;
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

/* Footer */
footer {
  background: var(--secondary-color);
  color: #94a3b8;
  padding: 4rem 0 0;
  margin-top: 4rem;
  border-top: 1px solid #334155;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 300px;
  line-height: 1.6;
}

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

.footer-section a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--accent-color);
}

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

.social-icons a {
  color: var(--white);
  font-size: 1.25rem;
  opacity: 0.8;
}

.social-icons a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem;
  background: #020617;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin: 0 auto;
  }

  .social-icons {
    justify-content: center;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .page-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  header {
    flex-direction: column;
    height: auto;
    gap: 1rem;
    padding: 1rem;
  }

  .header-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .header-nav input {
    width: 100%;
  }
}

/* Terms & Text Pages */
.terms-container {
  max-width: 800px;
  margin: 120px auto 60px;
  /* Top margin accounts for fixed header */
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.terms-container h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.terms-container h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.terms-container p {
  line-height: 1.7;
  color: #475569;
  margin-bottom: 1rem;
}

.terms-container ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.terms-container li {
  margin-bottom: 0.5rem;
  color: #475569;
}

/* About Page */
.about-page {
  max-width: 1000px;
  margin: 100px auto 3rem;
  padding: 0 2rem;
}

.about-hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
}

.about-hero h1 {
  font-size: 3rem;
  background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.about-section {
  margin-bottom: 4rem;
}

.about-section h2 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--accent-color);
  padding-left: 1rem;
}

.client-logos {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.client-logos img {
  height: 60px;
  /* Increased size */
  opacity: 1;
  filter: none;
  /* Removed grayscale */
  transition: all 0.3s;
  background: #f8fafc;
  /* Light background to contrast with white logos */
  padding: 10px;
  border-radius: 8px;
}

.client-logos img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid #f1f5f9;
}

.testimonial-card p {
  font-style: italic;
  color: #475569;
}

.testimonial-card span {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Contact Page */
.contact-container {
  max-width: 1200px;
  margin: 110px auto 4rem;
  padding: 0 2rem;
}

.contact-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-hero h1 {
  font-size: 2.5rem;
  color: var(--secondary-color);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.contact-card,
.contact-form form {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-sizing: border-box;
  /* Fix for overflow */
}

.contact-form button {
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-form button:hover {
  background: var(--primary-dark);
}

/* FAQ Page */
.faq-container {
  max-width: 800px;
  margin: 120px auto 4rem;
  padding: 0 2rem;
}

.faq-container h1 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--secondary-color);
}

.faq-container .faq {
  background: white;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
}

.faq-container .faq h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
}

.faq-container .faq p {
  color: var(--text-muted);
  margin: 0;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}