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

/* Tablet - Medium devices (768px and down) */
@media (max-width: 768px) {
  /* Hero Section */
  .hero-section {
    padding: 60px 0;
    text-align: center;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .hero-section .lead {
    font-size: 1.1rem;
  }
  
  /* Course Cards */
  .course-image {
    height: 200px;
  }
  
  .course-card .card-title {
    font-size: 1.1rem;
  }
  
  /* Navigation */
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  /* Better navbar toggler visibility */
  .navbar-toggler {
    border: 2px solid rgba(255,255,255,0.5);
    padding: 0.5rem 0.75rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
  }
  
  /* Navbar collapse improvements */
  .navbar-collapse {
    background: #343a40;
    padding: 1rem;
    margin: 0 -1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 0.25rem;
  }
  
  /* Dropdown Menu Mobile */
  .navbar .dropdown-menu {
    background: #2c3136;
    border: none;
    margin-left: 1rem;
  }
  
  .navbar .dropdown-item {
    color: #fff !important;
    padding: 0.75rem 1rem;
  }
  
  .navbar .dropdown-item:hover {
    background: rgba(255,255,255,0.15);
  }
  
  /* Search Form Mobile */
  .navbar form.d-flex {
    width: 100%;
    margin: 1rem 0;
  }
  
  .navbar form.d-flex .input-group {
    width: 100%;
  }
  
  /* Buttons */
  .btn:not(.btn-group .btn):not(.btn-sm):not(.dropdown-toggle) {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn-group {
    width: 100%;
    display: flex;
  }
  
  .btn-group .btn {
    flex: 1;
  }
  
  /* Cards */
  .card-body {
    padding: 1.25rem;
  }
  
  /* Tables */
  .table-responsive {
    font-size: 0.875rem;
  }
  
  /* Stats Section */
  .stat-item h2 {
    font-size: 2.5rem;
  }
}

/* Mobile - Small devices (576px and down) */
@media (max-width: 576px) {
  /* Container spacing */
  .container,
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Hero Section */
  .hero-section {
    padding: 40px 0;
  }
  
  .hero-section h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
  
  .hero-image-placeholder {
    padding: 2rem;
  }
  
  .hero-image-placeholder i {
    font-size: 3rem !important;
  }
  
  /* Navigation */
  .navbar {
    padding: 0.5rem 0;
  }
  
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  /* Navbar toggler - بهتر دیده بشه */
  .navbar-toggler {
    border: 2px solid #fff;
    background: rgba(255,255,255,0.1);
  }
  
  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }
  
  /* Search در موبایل */
  .navbar form.d-flex {
    margin: 0.75rem 0;
  }
  
  .navbar form .form-control {
    font-size: 0.9rem;
  }
  
  /* Dropdown items */
  .navbar .dropdown-item {
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
  }
  
  .navbar .dropdown-item i {
    width: 20px;
    display: inline-block;
  }
  
  /* Cards */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  /* Course Cards */
  .course-card .card-title {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .course-card .card-text {
    font-size: 0.875rem;
  }
  
  .course-image {
    height: 180px;
  }
  
  .course-meta {
    font-size: 0.8rem;
  }
  
  .price {
    font-size: 1rem !important;
  }
  
  /* Buttons */
  .btn {
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
  }
  
  .btn-lg {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }
  
  .btn-sm {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  /* Forms */
  .form-control,
  .form-select {
    font-size: 0.9rem;
    padding: 0.65rem 0.9rem;
  }
  
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  
  /* Modal */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .modal-header,
  .modal-footer {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-title {
    font-size: 1.1rem;
  }
  
  /* Tables */
  .table {
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.25rem;
  }
  
  /* Badges */
  .badge {
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
  }
  
  /* Category Cards */
  .category-card {
    margin-bottom: 0.75rem;
  }
  
  .category-card .card-body {
    padding: 1rem 0.5rem;
  }
  
  .category-icon i {
    font-size: 1.5rem !important;
  }
  
  /* Stats */
  .stat-item h2 {
    font-size: 2rem;
  }
  
  .stat-item p {
    font-size: 0.9rem;
  }
  
  /* Profile page */
  .profile-tabs .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
  
  /* Footer */
  footer {
    font-size: 0.9rem;
  }
  
  footer h5,
  footer h6 {
    font-size: 1rem;
  }
  
  /* Breadcrumb */
  .breadcrumb {
    font-size: 0.85rem;
    padding: 0.5rem 0;
  }
  
  /* Alert */
  .alert {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }
  
  /* Pagination */
  .page-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
  
  /* Feature Icons */
  .feature-icon .rounded-circle {
    width: 60px !important;
    height: 60px !important;
  }
  
  .feature-icon i {
    font-size: 1.5rem !important;
  }
}

/* Extra small mobile (400px and down) */
@media (max-width: 400px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }
  
  .hero-section .lead {
    font-size: 0.95rem;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
  
  .course-image {
    height: 160px;
  }
  
  .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
  
  .stat-item h2 {
    font-size: 1.75rem;
  }
  
  .card-title {
    font-size: 1rem;
  }
  
  .modal-title {
    font-size: 1rem;
  }
}