/* css/academy.css */
/* Academy: функциональный минимализм */
/* Mobile-first */

/* =========================================================
   BASE OVERRIDES
   ========================================================= */
body {
  background: #FFFFFF;
  color: #000000;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

body.rtl {
  direction: rtl;
  text-align: right;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #FFFFFF;
  border-bottom: 1px solid #F0F0F0;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 16px;
}

.nav-logo {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #000;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-link {
  color: #000;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.8;
}

.nav-link.active {
  opacity: 1;
}

.nav-divider {
  opacity: 0.25;
}

/* =========================================================
   LANGUAGE PANEL
   ========================================================= */
.lang-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000;
  transform: translateY(100%);
  opacity: 0;
  z-index: 200;
  pointer-events: none;
}

.lang-panel.open {
  pointer-events: auto;
}

.lang-panel-inner {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lang-panel-inner::-webkit-scrollbar {
  display: none;
}

.lang-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.lang-item:hover {
  opacity: 0.7;
}

.lang-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.3s ease;
}

.lang-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lang-name {
  font-family: 'Oswald', sans-serif;
  font-size: 9px;
  font-weight: 500;
  color: #FFF;
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Desktop - центрирование если помещается, hover +100% */
@media (min-width: 1200px) {
  .lang-panel-inner {
    justify-content: center;
    gap: 24px;
    padding: 24px 32px;
    overflow-x: visible;
  }
  
  .lang-item:hover .lang-avatar {
    transform: scale(2);
  }
  
  .lang-avatar {
    width: 44px;
    height: 44px;
  }
  
  .lang-name {
    font-size: 10px;
  }
}

/* Tablet - скролл */
@media (min-width: 768px) and (max-width: 1199px) {
  .lang-panel-inner {
    gap: 20px;
    padding: 20px 24px;
  }
  
  .lang-avatar {
    width: 40px;
    height: 40px;
  }
  
  .lang-item:hover .lang-avatar {
    transform: scale(1.5);
  }
}

/* =========================================================
   MAIN CONTENT - MOBILE
   ========================================================= */
.content {
  max-width: 100%;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

/* =========================================================
   SECTIONS - MOBILE
   ========================================================= */
.section {
  margin-bottom: 80px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

/* =========================================================
   SECTION A: ENTRY
   ========================================================= */
.section-entry {
  padding-top: 40px;
}

.entry-line {
  font-family: 'Oswald', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.entry-line.entry-sub {
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  text-transform: none;
  color: #666;
  margin-top: 24px;
  line-height: 1.6;
}

/* =========================================================
   SECTION B: TRAJECTORIES NAV
   ========================================================= */
.trajectories-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.trajectory-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #F0F0F0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.trajectory-link:first-child {
  border-top: 1px solid #F0F0F0;
}

.trajectory-link:hover {
  opacity: 0.6;
}

.trajectory-link.active {
  opacity: 1;
}

.trajectory-link.active .trajectory-num {
  color: #FF3B30;
}

.trajectory-num {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #FF3B30;
  min-width: 28px;
}

.trajectory-name {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
}

/* =========================================================
   SECTION C: TRAJECTORY DETAILS
   ========================================================= */
.section-trajectory-detail {
  padding-top: 40px;
  border-top: 1px solid #F0F0F0;
}

.trajectory-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}

.trajectory-detail-num {
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #FF3B30;
  line-height: 1;
}

.trajectory-detail-title {
  font-family: 'Oswald', sans-serif;
  font-size: 24px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.1;
}

.trajectory-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.trajectory-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trajectory-label {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.trajectory-text {
  font-size: 15px;
  line-height: 1.65;
  color: #333;
}

/* =========================================================
   SECTION D: COURSES
   ========================================================= */
.courses-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.course-item {
  display: block;
  padding: 24px 0;
  border-bottom: 1px solid #F0F0F0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.course-item:first-child {
  border-top: 1px solid #F0F0F0;
}

.course-item:hover {
  opacity: 0.7;
}

.course-status {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.course-status-upcoming {
  color: #FF3B30;
}

.course-status-active {
  color: #00C853;
}

.course-status-completed {
  color: #999;
}

.course-name {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 8px;
  line-height: 1.2;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

.course-divider {
  opacity: 0.4;
}

.courses-note {
  margin-top: 24px;
  font-size: 13px;
  color: #999;
}

/* =========================================================
   SECTION E: ACCESS
   ========================================================= */
.access-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.access-text {
  font-size: 16px;
  line-height: 1.65;
}

.access-text.access-sub {
  color: #666;
  font-size: 15px;
}

.access-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.access-item {
  font-size: 15px;
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}

.access-item::before {
  content: "·";
  position: absolute;
  left: 0;
  color: #FF3B30;
  font-weight: 700;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid #F0F0F0;
  padding: 24px;
}

.footer-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #999;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-link {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #000;
}

.footer-divider {
  opacity: 0.4;
}

/* =========================================================
   TABLET (min-width: 768px)
   ========================================================= */
@media (min-width: 768px) {
  .content {
    padding: 120px 40px 80px;
  }
  
  .section {
    margin-bottom: 100px;
    max-width: 720px;
  }
  
  .section-entry {
    padding-top: 60px;
  }
  
  .entry-line {
    font-size: 32px;
  }
  
  .nav-inner {
    padding: 12px 32px;
  }
  
  .nav-logo {
    font-size: 13px;
  }
  
  .nav-links {
    font-size: 12px;
    gap: 10px;
  }
  
  .nav-link {
    opacity: 0.6;
  }
  
  .nav-link:hover {
    opacity: 0.9;
  }
  
  .trajectory-name {
    font-size: 20px;
  }
  
  .trajectory-detail-num {
    font-size: 40px;
  }
  
  .trajectory-detail-title {
    font-size: 28px;
  }
}

/* =========================================================
   DESKTOP (min-width: 1024px)
   ========================================================= */
@media (min-width: 1024px) {
  .content {
    padding: 160px 60px 100px;
  }
  
  .section {
    margin-bottom: 140px;
    max-width: 900px;
  }
  
  .section-title {
    font-size: 13px;
    letter-spacing: 0.15em;
    margin-bottom: 40px;
    margin-left: -40px;
  }
  
  .section-title::after {
    content: " ·";
    color: #FF3B30;
  }
  
  /* Entry */
  .section-entry {
    padding-top: 80px;
    margin-bottom: 160px;
  }
  
  .entry-line {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 12px;
  }
  
  .entry-line.entry-sub {
    font-size: 18px;
    max-width: 700px;
    margin-top: 32px;
  }
  
  /* Trajectories Nav */
  .trajectories-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
  }
  
  .trajectory-link {
    flex: 0 0 50%;
    padding: 28px 24px 28px 0;
    border-bottom: 1px solid #F0F0F0;
    border-top: none;
  }
  
  .trajectory-link:first-child,
  .trajectory-link:nth-child(2) {
    border-top: 1px solid #F0F0F0;
  }
  
  .trajectory-link:nth-child(odd) {
    border-right: 1px solid #F0F0F0;
    padding-right: 24px;
  }
  
  .trajectory-link:nth-child(even) {
    padding-left: 24px;
  }
  
  .trajectory-num {
    font-size: 16px;
  }
  
  .trajectory-name {
    font-size: 24px;
  }
  
  /* Trajectory Details */
  .section-trajectory-detail {
    padding-top: 60px;
  }
  
  .trajectory-header {
    gap: 24px;
    margin-bottom: 48px;
  }
  
  .trajectory-detail-num {
    font-size: 56px;
  }
  
  .trajectory-detail-title {
    font-size: 36px;
  }
  
  .trajectory-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
  
  .trajectory-block {
    gap: 12px;
  }
  
  .trajectory-label {
    font-size: 11px;
  }
  
  .trajectory-text {
    font-size: 15px;
  }
  
  /* Courses */
  .course-item {
    padding: 32px 0;
  }
  
  .course-name {
    font-size: 24px;
  }
  
  .course-meta {
    font-size: 14px;
  }
  
  /* Access */
  .access-text {
    font-size: 18px;
    max-width: 700px;
  }
  
  .access-list {
    gap: 16px;
  }
  
  .access-item {
    font-size: 16px;
    padding-left: 24px;
  }
  
  /* Footer */
  .footer {
    padding: 40px 60px;
  }
  
  .footer-inner {
    max-width: 900px;
    font-size: 13px;
  }
  
  /* Nav */
  .nav-inner {
    padding: 12px 48px;
  }
  
  .nav-logo {
    font-size: 14px;
  }
  
  .nav-links {
    font-size: 12px;
    gap: 12px;
  }
  
  .nav-link {
    opacity: 0.6;
  }
  
  .nav-link:hover {
    opacity: 0.9;
  }
}

/* =========================================================
   LARGE DESKTOP (min-width: 1280px)
   ========================================================= */
@media (min-width: 1280px) {
  .section {
    max-width: 1000px;
  }
  
  .section-title {
    margin-left: -60px;
  }
  
  .entry-line {
    font-size: 56px;
  }
  
  .trajectory-detail-num {
    font-size: 64px;
  }
  
  .trajectory-detail-title {
    font-size: 40px;
  }
}

/* =========================================================
   EXTRA LARGE (min-width: 1440px)
   ========================================================= */
@media (min-width: 1440px) {
  .section {
    max-width: 1100px;
  }
  
  .section-title {
    margin-left: -80px;
  }
  
  .entry-line {
    font-size: 64px;
  }
}

/* =========================================================
   MOBILE SMALL (max-width: 600px)
   ========================================================= */
@media (max-width: 600px) {
  .nav-inner {
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
  }
  
  .nav-logo {
    font-size: 11px;
  }
  
  .nav-links {
    font-size: 10px;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-divider {
    margin: 0 1px;
  }
  
  .content {
    padding: 90px 20px 50px;
  }
  
  .entry-line {
    font-size: 22px;
  }
  
  .trajectory-detail-num {
    font-size: 28px;
  }
  
  .trajectory-detail-title {
    font-size: 20px;
  }
}

/* =========================================================
   MOBILE LANGUAGE PANEL (max-width: 768px)
   ========================================================= */
@media (max-width: 768px) {
  .lang-panel {
    height: 35vh;
    max-height: 35vh;
  }
  
  .lang-panel-inner {
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 3vw 4vw;
    padding: 3vh 3vw;
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  .lang-item {
    flex: 0 0 auto;
    width: calc(20% - 4vw);
    min-width: 50px;
  }
  
  .lang-avatar {
    width: 10vw;
    height: 10vw;
    max-width: 50px;
    max-height: 50px;
  }
  
  .lang-name {
    font-size: 2vw;
  }
}

/* =========================================================
   RTL ADJUSTMENTS
   ========================================================= */
body.rtl .section-title {
  margin-left: 0;
  margin-right: -40px;
}

body.rtl .trajectory-link {
  flex-direction: row-reverse;
}

body.rtl .trajectory-header {
  flex-direction: row-reverse;
}

body.rtl .access-item {
  padding-left: 0;
  padding-right: 20px;
}

body.rtl .access-item::before {
  left: auto;
  right: 0;
}

body.rtl .nav-links {
  flex-direction: row-reverse;
}

body.rtl .footer-inner {
  flex-direction: row-reverse;
}

body.rtl .footer-links {
  flex-direction: row-reverse;
}

@media (min-width: 1024px) {
  body.rtl .section-title {
    margin-left: 0;
    margin-right: -40px;
  }
  
  body.rtl .trajectory-link:nth-child(odd) {
    border-right: none;
    border-left: 1px solid #F0F0F0;
    padding-right: 0;
    padding-left: 24px;
  }
  
  body.rtl .trajectory-link:nth-child(even) {
    padding-left: 0;
    padding-right: 24px;
  }
}

@media (min-width: 1280px) {
  body.rtl .section-title {
    margin-right: -60px;
  }
}

@media (min-width: 1440px) {
  body.rtl .section-title {
    margin-right: -80px;
  }
}
