/* ====== Reset ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6fb;
  color: #333;
  display: flex;
  transition: background 0.3s, color 0.3s;
}

/* ====== Sidebar ====== */
.sidebar {
  width: 260px;
  background: #4b2e83;
  color: #fff;
  min-height: 100vh;
  padding: 20px;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  font-size: 1.3em;
  margin-bottom: 15px;
}

.sidebar ul {
  list-style: none;
  flex: 1;
}

.sidebar li {
  margin: 10px 0;
}

.sidebar a {
  color: #ddd;
  text-decoration: none;
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ====== Main ====== */
.main {
  margin-left: 260px;
  padding: 30px;
  flex: 1;
}

/* ====== Header ====== */
header {
  background: linear-gradient(135deg, #4b2e83, #6c4bb4);
  color: #fff;
  padding: 50px 30px;
  border-radius: 16px;
  margin-bottom: 40px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  animation: fadeIn 1s ease;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1em;
  opacity: 0.9;
}

/* ====== Header search (универсальный) ====== */
.header-search {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.header-search input {
  width: 480px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 1em;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* ====== Sections ====== */
h2 {
  margin: 30px 0 20px;
  font-size: 1.6em;
  color: #4b2e83;
  border-left: 6px solid #6c4bb4;
  padding-left: 12px;
}

/* ====== Lecture Cards ====== */
.lectures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
  animation: fadeInUp 1s ease;
}

.lecture-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
}

.lecture-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.lecture-card h3 {
  margin: 0;
  font-size: 1.2em;
  color: #4b2e83;
}

.lecture-card p {
  margin: 10px 0;
  font-size: 0.9em;
  color: #666;
}

.lecture-card button {
  background: #4b2e83;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.3s ease, transform 0.2s ease;
}

.lecture-card button:hover {
  background: #6c4bb4;
  transform: scale(1.05);
}

/* ====== Animations ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .main {
    margin: 0;
    padding: 15px;
  }

  /* header padding меньше на мобильных, поиск растягиваем */
  header {
    padding: 28px 18px;
  }

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