:root {
  --primary: #16A4A0;
  --logo-start: #16A4A0;
  --gray-text: #64748B;
  --light-gray: #F3F4F6;
  --border: #ddd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #F8FAFC;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background: white;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left {
  display: flex;
  gap: 20px;
  align-items: center;
}

.text-logo {
  color: #16A4A0;
  margin: 0;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.5px;
}

.search-box {
  position: relative;
  flex: 0 1 300px;
}

.search-box input {
  width: 100%;
  padding: 8px 20px 8px 35px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f1f5f9;
  outline: none;
  font-size: 14px;
  transition: 0.3s;
}

.search-box input:focus {
  background: #fff;
  border-color: #16A4A0;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.nav-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-right a {
  text-decoration: none;
  color: #111;
}

.nav-item {
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  color: var(--gray-text);
  padding: 8px 12px;
  border-radius: 6px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-item i {
  font-size: 18px;
  margin-bottom: 4px;
}

.nav-item.active {
  background-color: #E0F8F7;
  color: var(--primary);
}

.nav-item.active a {
  color: var(--primary);
}

.nav-item:hover {
  color: #16A4A0;
}

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

/* LAYOUT */
.layout {
  display: flex;
  gap: 20px;
  padding: 20px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.left {
  width: 25%;
}

.left a {
  text-decoration: none;
}

.feed {
  width: 50%;
  display: flex;
  flex-direction: column;
}

.courses {
  width: 25%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  height: fit-content;
}


.courses-widget {
    width: 25%;
    min-width: 280px; 
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    height: fit-content;
}


.courses-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.courses-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.view-all-link {
    font-size: 12px;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #2563eb;
    text-decoration: underline;
}


#rec-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}


.course-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
}

.course-item:hover {
    background: #f8fafc;
}


.course-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.course-icon.purple-bg {
    background: #f3e8ff;
    color: #9333ea;
}

.course-icon.blue-bg {
    background: #eff6ff;
    color: #3b82f6;
}

.course-icon.green-bg {
    background: #f0fdf4;
    color: #10b981;
}


.course-text {
    flex: 1;
    overflow: hidden; 
}

.course-text h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
}

.course-text p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}


.course-action {
    color: #cbd5e1;
    font-size: 20px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.course-item:hover .course-action {
    color: #0f172a;
    transform: translateX(4px); 
}

/* PROFILE CARD */
.profile-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  color: #333;
}

.banner {
  height: 70px;
  background: linear-gradient(90deg, #4f6df5, #4fd1c5);
}

.profile-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-top: -35px;
  margin-left: 20px;
  border: 3px solid white;
  object-fit: cover;
  background-color: #fff;
}

.profile-card h3 {
  margin-top: 10px;
  text-align: center;
  font-size: 16px;
  margin-bottom: 5px;
}

.job {
  font-size: 14px;
  color: #777;
  text-align: center;
  padding-bottom: 15px;
}

/* CREATE POST */
.create-post {
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  margin-bottom: 20px;
}

.create-post img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.post-input-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  background: #F1F5F9;
  border-radius: 30px;
  padding: 5px 8px 5px 20px;
  border: 1px solid transparent;
  transition: border 0.3s;
}

.post-input-wrapper:focus-within {
  border: 1px solid #16A4A0;
  background: white;
}

.post-input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 0.95rem;
  outline: none;
  color: #1E293B;
}

.post-submit-btn {
  background-color: #16A4A0;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.post-submit-btn:hover {
  background-color: #0f8582;
}

/* POST CARDS (Reddit Style) */
.post-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.post-card-header { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-bottom: 15px; 
}

.user-icon { 
  width: 40px; 
  height: 40px; 
  border-radius: 10px; 
  background: #16A4A0; 
  color: white;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 18px;
}

.author-name { 
  font-weight: 700; 
  font-size: 1rem; 
  margin: 0; 
  color: #111;
}

.badge {
  font-size: 0.70rem; 
  font-weight: 700; 
  text-transform: uppercase;
  padding: 4px 10px; 
  border-radius: 20px; 
  margin-left: auto;
  letter-spacing: 0.5px;
}

.reddit-badge { 
  background: #FEF3C7; 
  color: #92400E; 
}

.post-body { 
  font-size: 1rem; 
  color: #475569; 
  line-height: 1.6; 
  margin-bottom: 15px; 
}

.footer-row {
  display: flex; 
  gap: 24px; 
  border-top: 1px solid #F1F5F9;
  padding-top: 15px; 
}

.action-item {
  display: flex; 
  align-items: center; 
  gap: 8px;
  font-size: 0.85rem; 
  font-weight: 600; 
  color: #64748B; 
  cursor: pointer;
  transition: color 0.2s;
}

.action-item:hover { 
  color: #16A4A0; 
}

/* BUTTONS */
.btn-container { 
  text-align: center; 
  margin-top: 10px; 
  padding-bottom: 20px; 
}

.see-more-btn {
  background-color: #16A4A0;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.see-more-btn:hover { 
  background-color: #0f8582; 
}

/* RECOMMENDATIONS CARD */
.courses h4 {
  padding: 15px 18px;
  font-size: 16px;
  border-bottom: 1px solid #eee;
}

/* FOOTER */
.footer {
  background: #ffffff;
  margin-top: 60px;
  border-top: 1px solid #eee;
}

.footer-content {
  text-align: center;
  padding: 60px 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.footer-links a {
  text-decoration: none;
  color: #111;
  font-size: 15px;
  font-weight: 500;
  transition: 0.3s;
}

.footer-links a:hover {
  opacity: 0.7;
  color: var(--primary);
}

.footer-social {
  margin-bottom: 25px;
}

.footer-social a {
  color: var(--primary);
  font-size: 18px;
  margin: 0 14px;
  transition: 0.3s;
}

.footer-social a:hover {
   opacity: 0.7;
}

.footer-copy {
  font-size: 13px;
  color: #9a9a9a;
}


/* ================= RESPONSIVE ================= */

/* Hide burger button on desktop */
.burger-btn {
  display: none; 
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* Tablet & Mobile Adjustments */
@media (max-width: 992px) {
  .layout {
    flex-direction: column;
    padding: 20px;
  }

  .left, .feed, .courses {
    width: 100%;
  }

  .profile-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
  }

  .profile-img {
    margin-top: 0;
    margin-left: 0;
    margin-right: 15px;
  }
  
  .banner {
    display: none;
  }

  .profile-card h3, .job {
    text-align: left;
    margin: 0;
    padding: 0;
  }
}

/* Strict Mobile adjustments */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 20px;
  }
  
  .search-box {
    display: none; 
  }

  .burger-btn {
    display: block; 
  }

  .nav-right {
    display: none; 
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 15px 0;
  }

  .nav-right.active {
    display: flex; 
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 30px;
    width: 100%;
    font-size: 16px;
    gap: 15px;
  }

  .nav-item i {
    margin-bottom: 0;
    width: 25px;
    text-align: center;
  }
  
  .footer-links {
    gap: 20px;
    flex-direction: column;
  }
}

