
html {
    min-height: 100%;
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}


.header {
    background-color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.logo-icon {
    display: inline-block;
    width: 28px;
    height: 20px;
    background-color: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 3px;
    margin-left: 8px;
    position: relative;
}
.logo-icon::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 12px;
    background-color: #ccc;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    font-size: 14px;
    color: #555;
    padding: 5px;
}
.main-nav a:hover {
    color: #000;
}

.main {
    flex: 1 0 auto;
    padding: 40px 0;
}

.profile-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}


.profile-content {
    padding: 30px;
}

.profile-details {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.profile-avatar {
    flex-basis: 200px;
    text-align: center;
}

.profile-avatar h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.avatar-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px auto;
    border: 3px solid #f0f0f0;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-avatar {
    background: linear-gradient(90deg, #6e48d3, #4f6de8);
    color: #ffffff;
    width: 100%;
}
.btn-avatar:hover {
    opacity: 0.9;
}

.profile-form {
    flex: 1;
    max-width: 450px;
    
}

.profile-form h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #d0d0d0;
    background-color: #f7f7f7;
    border-radius: 6px;
}

.btn-save {
    background-color: #32cd32;
    color: #ffffff;
    padding: 12px 30px;
}
.btn-save:hover {
    background-color: #28a728;
}



.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 300px);
    justify-content: center;
    gap: 25px;
}

.course-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #ffffff;
    height: 220px; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    background-size: cover;
    background-position: center;
}

.course-card-category {
    position: relative;
    z-index: 2;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
}

.course-card-footer {
    position: relative;
    z-index: 2;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.progress-bar {
    height: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden; 
}

.progress-bar-inner {
    height: 100%;
    background-color: #2e8b57;
    border-radius: 7px 0 0 7px;
}

.btn-course {
    margin-top: 8px;
    width: 100%;
    
    background-color: #2e8b57;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-course.btn-start {
    background-color: #32cd32;
}

.course-card-percent {
    font-size: 14px;
    font-weight: 600;
    width: 40px;
    text-align: right;
}


.footer {
    margin-top: auto;
    background-color: #4a4a4a;
    color: #c0c0c0;
    padding: 40px 0;
    font-size: 14px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer .logo {
    color: #ffffff;
}

.footer .logo-icon {
    background-color: #555;
    border-color: #777;
}
.footer .logo-icon::before {
    background-color: #777;
}

.footer-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: block;
}

.social-links img {
    width: 24px;
    height: 24px;
    fill: #c0c0c0;
    transition: fill 0.2s ease;
}

.social-links a:hover svg {
    fill: #ffffff;
}


@media (max-width: 992px) {
    .courses-grid {
        grid-template-columns: repeat(2, 300px);
    }
    .profile-details {
        flex-direction: column;
        align-items: center;
    }
    .profile-form {
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    .footer .container {
        flex-direction: column;
        gap: 25px;
    }
    .footer-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .courses-grid {
        grid-template-columns: repeat(2, 300px);
    }
}

@media (max-width: 680px) {
     .courses-grid {
        grid-template-columns: 300px;
    }
    .course-card {
        height: 220px;
    }
}

.hidden {
    display: none;
}

.all-courses-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
}

.all-courses-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f0f0f0;
}

.motivation-box {
  flex: 1;
  background-color: #e0f8e5;
  border: 2px solid #50c878;
  border-radius: 12px;
  padding: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

.all-courses-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 220px;
}

.course-listing {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  min-height: 220px;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.course-listing-media {
  min-height: 220px;
  background-color: #dbe6f5;
  background-size: cover;
  background-position: center;
  position: relative;
}

.course-listing-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 18, 31, 0.1) 0%, rgba(12, 18, 31, 0.35) 100%);
}

.course-listing-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  align-items: center;
}

.course-listing-info {
  flex: 1;
  min-width: 0;
}

.course-listing-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.course-listing-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: #101828;
  margin-bottom: 10px;
}

.course-listing-info p {
  font-size: 15px;
  color: #475467;
  line-height: 1.6;
  max-width: 720px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-listing-actions {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}

.course-level-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #344054;
  background: #f2f4f7;
  text-align: center;
}

.btn-enroll {
  min-width: 180px;
  background: linear-gradient(135deg, #2f6df6 0%, #5b8cff 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(47, 109, 246, 0.25);
}

.btn-enroll:hover {
  background: linear-gradient(135deg, #245bce 0%, #4f7ceb 100%);
}


@media (max-width: 768px) {
 .all-courses-header {
    flex-direction: column;
    align-items: center; 
    padding: 0;
  }
 .course-listing {
    grid-template-columns: 1fr;
    min-height: 0;
  }
 .course-listing-media {
    min-height: 190px;
  }
 .course-listing-content {
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
  }
 .course-listing-info p {
    max-width: 100%;
  }
 .course-listing-actions {
    flex-basis: auto;
    align-items: stretch;
    text-align: left;
    display: flex;
    justify-content: flex-start;
    gap: 12px;
  }
 .btn-enroll {
    width: 100%;
    min-width: 0;
  }
}

.profile-tabs-wrapper {
    display: flex;
    background-color: #f9f9f9;
    padding-left: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.tab-label {
    cursor: pointer;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #777;
    margin-bottom: -1px;
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-right: 5px;
    margin-top: 5px;
    transition: background-color 0.2s;
}

.tab-label:hover {
    background-color: #e8e8e8;
}

.tab-label.active {
    color: #333;
    font-weight: 600;
    background-color: #bdfcc9;
    border: 1px solid #a8e6b6;
    border-bottom: 1px solid #bdfcc9;
    padding: 15px 25px;
    margin-top: 0;
}

/* Стилизация АКТИВНОЙ вкладки */
#tab-my-courses:checked ~ .profile-tabs-wrapper .tab-label[for="tab-my-courses"],
#tab-all-courses:checked ~ .profile-tabs-wrapper .tab-label[for="tab-all-courses"] {
    color: #333;
    font-weight: 600;
    background-color: #bdfcc9;
    border: 1px solid #a8e6b6;
    border-bottom: 1px solid #bdfcc9;
    padding: 15px 25px;
    margin-top: 0;
}

.tab-content {
    display: none;
}

#tab-my-courses:checked ~ .profile-tabs-wrapper ~ .profile-content #content-my-courses {
    display: block;
}

#tab-all-courses:checked ~ .profile-tabs-wrapper ~ .profile-content #content-all-courses {
    display: block;
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}

.modal-content {
    background-image: url("./img/Rectangle\ 74.png"); 
    background-size: cover;
    background-position: center;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    max-width: 100%;
    position: relative;
    color: #fff; 
}

.close {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #ccc;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}

.modal-content .form-group input {
    background-color: #d1f2eb; 
    border: none;
    border-radius: 5px;
}

.modal-content .btn-save {
    background-color: #32cd32;
    color: #fff;
    width: 100%;
    border-radius: 20px; 
    margin-top: 20px;
}
/* ==================================== */
/* Стили для Поиска и Фильтров (My Courses) */
/* ==================================== */

.filter-panel {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5); /* Темный полупрозрачный фон */
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    color: white;
}

.search-box {
    flex-grow: 1;
}

.filter-checkboxes {
    display: flex;
    gap: 15px;
}

.filter-checkboxes label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==================================== */
/* ОБЩИЕ СТИЛИ ДЛЯ ПОЛЕЙ ВВОДА */
/* ==================================== */

.app-input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: none;
    outline: none;
    background: #fff;
    color: #333;
}

/* ==================================== */
/* Стили для Поиска (All Courses) */
/* ==================================== */

/* Обертка для контейнера поиска во 'Всех курсах' */
.search-bar-wrapper {
    margin: 0 0 20px 0;
    width: 100%;
}

/* Переопределяем padding и border-radius для более крупного поля "Все курсы" */
#all-courses-search {
    padding: 15px; 
    border-radius: 10px; 
    font-size: 16px;
}

.empty-state {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef4ff 0%, #f6fbf7 100%);
    color: #516072;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

.people-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.people-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.people-sidebar,
.people-profile-slot {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
}

.people-sidebar {
    padding: 22px;
    min-height: 540px;
    display: flex;
    flex-direction: column;
}

.people-sidebar-header {
    margin-bottom: 18px;
}

.people-sidebar-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #101828;
}

.people-sidebar-header p {
    color: #475467;
    line-height: 1.5;
}

.people-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 320px;
    flex: 1;
    overflow-y: auto;
}

.person-result-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: #f8fafc;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.person-result-card.is-active {
    border-color: #7ccf91;
    box-shadow: 0 10px 24px rgba(80, 200, 120, 0.16);
    transform: translateY(-1px);
}

.person-result-trigger {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    gap: 14px;
    padding: 14px;
    cursor: pointer;
    text-align: left;
}

.person-result-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
    background: #dbe6f5;
}

.person-result-body {
    flex: 1;
    min-width: 0;
}

.person-result-heading h3 {
    font-size: 17px;
    color: #101828;
    margin-bottom: 4px;
}

.person-result-heading span {
    color: #667085;
    font-size: 14px;
}

.person-result-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
}

.people-profile-slot {
    padding: 28px;
    min-height: 540px;
}

.people-empty-state,
.people-results-empty,
.public-profile-empty {
    min-height: 160px;
}

.public-profile-card {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.public-profile-hero {
    display: flex;
    gap: 20px;
    align-items: center;
}

.public-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    object-fit: cover;
    background: #dbe6f5;
}

.public-profile-main h2 {
    font-size: 30px;
    color: #101828;
    margin-bottom: 6px;
}

.public-profile-main p {
    color: #667085;
    font-size: 16px;
}

.public-profile-platform {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eff8ff;
    color: #175cd3;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.public-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.public-stat-box {
    background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    padding: 18px;
}

.public-stat-box span {
    display: block;
    color: #667085;
    font-size: 14px;
    margin-bottom: 10px;
}

.public-stat-box strong {
    font-size: 28px;
    color: #101828;
}

.public-profile-courses {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.public-profile-courses-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.public-profile-courses-header h3 {
    font-size: 22px;
    color: #101828;
}

.public-profile-courses-header span {
    color: #667085;
    font-weight: 600;
}

.public-profile-course-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.public-course-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #ffffff;
}

.public-course-media {
    min-height: 120px;
    background-color: #dbe6f5;
    background-size: cover;
    background-position: center;
}

.public-course-body {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    align-items: center;
}

.public-course-body h4 {
    font-size: 18px;
    color: #101828;
    margin-bottom: 8px;
}

.public-course-body p {
    color: #475467;
    line-height: 1.55;
}

.public-course-meta {
    min-width: 110px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    color: #667085;
    font-size: 14px;
}

.public-course-meta strong {
    color: #027a48;
    font-size: 16px;
}

@media (max-width: 992px) {
    .people-layout {
        grid-template-columns: 1fr;
    }

    .people-profile-slot {
        min-height: 0;
    }

    .public-profile-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .public-profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-course-card {
        grid-template-columns: 1fr;
    }

    .public-course-media {
        min-height: 180px;
    }

    .public-course-body {
        flex-direction: column;
        align-items: stretch;
    }

    .public-course-meta {
        align-items: flex-start;
    }
}
