/* ==========================================================================
   1. ОБЩИЕ СТИЛИ ДЛЯ ВЫРАВНИВАНИЯ И КОНТЕЙНЕРА (ЧТОБЫ НИЧЕГО НЕ СЛЕТАЛО)
   ========================================================================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
  body {
    background-color: #e8f5e9; 
    color: #2c3e50;
    display: flex;
    justify-content: center;
    padding: 20px 10px;
  }
  
  .div-container {
    background-color: #ffffff;
    max-width: 1200px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 20px;
  }
  
  /* ==========================================================================
     2. СТИЛИ ДЛЯ СТРОГОЙ И КРАСИВОЙ ШАПКИ (HEADER)
     ========================================================================== */
  .main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0a5c4a, #004d40); 
    padding: 25px 40px;
    border-radius: 12px;
    color: white;
    margin-bottom: 20px;
    gap: 20px;
  }
  
  .header-logo-left, 
  .header-logo-right {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    border: 3.5px solid #d4af37; 
    background-color: #ffffff;   
    overflow: hidden;            
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;            
  }
  
  .header-logo-left img, 
  .header-logo-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;         
  }
  
  .header-logo-right img {
    transform: scale(2.45); /* Твой идеальный зум до краев круга */
  }
  
  .header-logo-left img {
    transform: scale(1.05);    
  }
  
  .header-text {
    text-align: center;
    flex-grow: 1;
  }
  
  .header-text h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }
  
  .header-text h2 {
    font-size: 1.4rem;
    color: #d4af37; 
    font-weight: 400;
    margin-top: 5px;
  }
  
  /* ==========================================================================
     3. СТИЛИ ДЛЯ ГЛАВНОГО МЕНЮ (КОТОРЫЕ ПОТЕРЯЛИСЬ)
     ========================================================================== */
  .menu-container {
    overflow: hidden;
    background: #f8f9fa;
    cursor: grab;
    margin-bottom: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
  }
  
  .menu-container:active {
    cursor: grabbing;
  }
  
  .menu-items {
    display: flex;
    gap: 15px;
    padding: 12px;
    overflow-x: auto;
    white-space: nowrap;
    user-select: none;
    scrollbar-width: none;
  }
  
  .menu-items::-webkit-scrollbar {
    display: none;
  }
  
  .item {
    flex: 0 0 auto;
    padding: 10px 24px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
  }
  
  .item:hover {
    transform: translateY(-2px);
    border-color: #0a5c4a;
  }
  
  .item a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
  }
  
  .item.active {
    background-color: #0a5c4a;
  }
  .item.active a {
    color: #fff;
  }
  
  .item.highlight {
    background-color: #fff3cd;
    border-color: #ffeeba;
  }
  .item.highlight a {
    color: #856404;
  }
  .item.highlight:hover {
    background-color: #ffe8a1;
  }
  
  /* ==========================================================================
     4. СТИЛИ ДЛЯ СЕТКИ УРОКОВ И КНОПОК ФИЛЬТРАЦИИ
     ========================================================================== */
  .sahifa {
    display: flex;
    flex-direction: column;
    gap: 35px;
  }
  
  .lessons-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .filter-btn {
    padding: 8px 18px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s, color 0.2s;
  }
  
  .filter-btn:hover {
    background-color: #e2e8f0;
    transform: translateY(-1px);
  }
  
  .filter-btn.active {
    background-color: #0a5c4a;
    color: #ffffff;
    border-color: #0a5c4a;
  }
  
  .lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
  }
  
  .lesson-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .lesson-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  }
  
  .lesson-preview {
    position: relative;
    width: 100%;
    height: 190px;
    background-color: #000;
  }
  
  .lesson-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .subject-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #d4af37;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
  }
  
  .lesson-info {
    padding: 18px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
  
  .lesson-date {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 6px;
  }
  
  .lesson-info h3 {
    font-size: 1.15rem;
    color: #0a5c4a;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.4;
  }
  
  .lesson-info p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
  }
  
  .watch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #e74c3c;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    margin-top: auto;
  }
  
  .watch-btn:hover {
    background-color: #c0392b;
  }
  
  /* ==========================================================================
     5. ПОДВАЛ И АДАПТИВНОСТЬ ДЛЯ СМАРТФОНОВ
     ========================================================================== */
  #tugash-qismi {
    margin-top: 40px;
    padding: 25px;
    background-color: #1a202c;
    color: #a0aec0;
    border-radius: 12px;
    text-align: center;
  }
  
  #tugash-qismi h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 5px;
  }
  
  #tugash-qismi p {
    font-size: 0.85rem;
  }
  
  @media screen and (max-width: 850px) {
    .main-header {
      flex-direction: column;
      gap: 15px;
      padding: 20px;
    }
    .header-logo-right {
      display: none; 
    }
    .lessons-grid {
      grid-template-columns: 1fr;
    }
    .header-text h1 {
      font-size: 1.8rem;
    }
  }