/*
 * Xcurs Platform Stylesheet
 *
 * This file contains custom styles used across the Xcurs peer‑to‑peer learning
 * platform.  The design builds on top of Bootstrap 5 defaults to create a
 * modern, approachable user interface.  Colour variables are declared at
 * the top of the file for easy theming.
 */

/* Colour palette */
:root {
  --primary-color: #4c63d2;
  --secondary-color: #ff7f50;
  --accent-color: #00b8a9;
  --dark-color: #0a1931;
  --light-color: #f8f9fa;
  --text-color: #333333;
}

/* Global styles */
body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  margin: 0;
  background-color: var(--light-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Navigation bar */
.navbar {
  background-color: var(--dark-color);
  padding: 0.75rem 1rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: #ffffff;
}

.navbar-nav .nav-link {
  color: #dddddd;
  margin-left: 1rem;
  font-weight: 500;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #ffffff;
}

/* Hero section */
.hero {
  background-color: var(--dark-color);
  color: #ffffff;
  padding: 6rem 0;
  overflow: hidden;
}

.hero .text h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero .text p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.hero .image img {
  max-width: 100%;
  height: auto;
}

/* Feature cards */
.feature-card {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

.feature-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-top: 4rem;
  margin-bottom: 2.5rem;
  color: var(--dark-color);
}

/* Footer */
.footer {
  background-color: var(--dark-color);
  color: #bbbbbb;
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.footer a {
  color: var(--secondary-color);
  margin-right: 1rem;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #ffffff;
}

/* Forms */
form .form-control,
form .form-select {
  border-radius: 0.375rem;
  padding: 0.75rem;
}

form .btn {
  padding: 0.75rem 1rem;
  font-weight: 600;
}

/* Cards for dashboard and search */
.card-profile {
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.card-profile .avatar {
  flex-shrink: 0;
  font-size: 3rem;
  color: var(--primary-color);
}

.card-profile .avatar img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
}

.card-profile .info h5 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.card-profile .info .rating i {
  color: #f5c518;
  margin-right: 0.125rem;
}

.badge-level {
  background-color: var(--primary-color);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-right: 0.25rem;
}

/* Chat styles */
.chat-window {
  height: 500px;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
  background-color: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.chat-message {
  margin-bottom: 0.75rem;
  max-width: 75%;
}

.chat-message.sent {
  align-self: flex-end;
}

.chat-message .bubble {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  display: inline-block;
  font-size: 0.875rem;
}

.chat-message.received .bubble {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
}

.chat-message.sent .bubble {
  background-color: var(--primary-color);
  color: #ffffff;
}

.chat-input {
  border: 1px solid #e5e5e5;
  border-top: none;
  padding: 0.75rem;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

.chat-input input {
  flex-grow: 1;
  border: none;
  outline: none;
  padding: 0.5rem;
  font-size: 0.875rem;
}

.chat-input button {
  background-color: var(--primary-color);
  border: none;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  margin-left: 0.5rem;
}

.chat-input button:hover {
  background-color: var(--secondary-color);
}

/* Utility classes */
.rounded-circle {
  border-radius: 50%;
}

.small-text {
  font-size: 0.875rem;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mt-5 {
  margin-top: 2rem !important;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}