/**
 * Responsive Styles
 * Mobile and tablet responsive design
 */

/* Tablets and Small Desktops */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 1rem;
  }

  .navbar-brand h1 {
    font-size: 1.25rem;
  }

  .menu-toggle {
    display: block !important;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001; /* Stay above navbar-menu */
  }

  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 280px; /* Slightly wider */
    background: linear-gradient(
      145deg,
      #0f172a,
      #1e293b
    ); /* Premium gradient */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 5rem 2rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother transition */
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8); /* Deeper shadow */
    margin: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border for depth */
  }

  .navbar-menu.active {
    right: 0;
  }

  .navbar-menu li {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .navbar-menu a {
    display: block;
    font-size: 1.25rem; /* Slightly smaller for better fit */
    padding: 1rem 1.5rem;
    color: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
  }

  .navbar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
  }

  .user-info {
    position: absolute;
    right: 4rem; /* to the left of the hamburger menu */
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
  }

  .role-badge {
    display: none; /* hide role badge on mobile to save space */
  }

  .navbar-brand h1 {
    font-size: 1.3rem;
  }

  .hero-section {
    padding: 2rem 1rem;
    margin: 1rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .features-section,
  .courses-grid,
  .dashboard-grid,
  .enrollments-list {
    grid-template-columns: 1fr;
  }

  .course-header {
    flex-direction: column;
  }

  .course-header img {
    width: 100%;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group .btn {
    width: 100%;
  }

  .course-stats {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header {
    flex-direction: column;
    gap: 1rem;
  }

  .page-header .btn {
    width: 100%;
  }

  .courses-table,
  .payment-table {
    overflow-x: auto;
  }

  .courses-table table,
  .payment-table table {
    min-width: 600px;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .admin-hub-header {
    flex-direction: column;
  }

  .admin-user-chip {
    width: 100%;
    min-width: unset;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-list div {
    flex-direction: column;
  }

  .settings-list strong {
    text-align: left;
  }

  .form-large {
    padding: 1.5rem 1rem;
  }

  .payment-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem 1rem;
  }

  .admin-approve-courses-page {
    padding: 1.5rem 1rem;
  }

  .courses-approval-list {
    gap: 1rem;
  }

  .course-approval-card {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 600px) {
  .navbar-menu {
    gap: 0.75rem;
  }

  .navbar-menu a {
    padding: 0.85rem 1.25rem;
    font-size: 1.3rem;
  }
  .hero-section {
    padding: 1.5rem 1rem;
  }

  .hero-section h1 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
  }

  .course-meta {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Mobile Phones */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .navbar-container {
    padding: 0.75rem 1rem;
  }

  .navbar-brand h1 {
    font-size: 1.1rem;
  }

  /* Mobile sidebar adjustments */
  .navbar-menu {
    gap: 0.5rem;
    font-size: 1rem;
  }

  .user-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .role-badge {
    font-size: 0.65rem;
    padding: 0.4rem 0.7rem;
  }

  .hero-section {
    padding: 2rem 1rem;
    margin: 0.5rem;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-section p {
    font-size: 0.95rem;
  }

  .feature {
    padding: 1.5rem 1rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  .auth-card {
    padding: 1.5rem 1rem;
    max-width: 100%;
  }

  .auth-card h2 {
    font-size: 1.4rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .profile-card {
    padding: 1.5rem 1rem;
    margin: 1rem 0.5rem;
  }

  .course-card {
    border-radius: 8px;
  }

  .course-card img {
    height: 150px;
  }

  .course-info {
    padding: 1rem;
  }

  .course-info h3 {
    font-size: 1.1rem;
  }

  .course-detail-page,
  .courses-page,
  .dashboard {
    padding: 1rem;
  }

  .dashboard h2,
  .page-header h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .dashboard-card,
  .enrollment-card {
    padding: 1.2rem 1rem;
  }

  .dashboard-card h3,
  .enrollment-card h3 {
    font-size: 1.1rem;
  }

  .dashboard-card p {
    font-size: 0.9rem;
  }

  .enrollment-meta {
    flex-direction: column;
    gap: 0.3rem;
  }

  .courses-table {
    font-size: 0.85rem;
  }

  .courses-table th,
  .courses-table td {
    padding: 0.75rem;
  }

  .footer {
    padding: 1rem;
    font-size: 0.9rem;
    margin-top: auto;
    margin-bottom: 0;
  }

  .message {
    margin: 0.75rem 0;
    padding: 0.75rem;
  }
}

/* Very Small Phones */
@media (max-width: 320px) {
  html {
    font-size: 12px;
  }

  .navbar-brand h1 {
    font-size: 0.9rem;
  }

  .navbar-menu {
    gap: 0.5rem;
  }

  .navbar-menu a {
    font-size: 1.2rem;
    padding: 0.75rem 1rem;
  }

  .hero-section h1 {
    font-size: 1.2rem;
  }

  .hero-section p {
    font-size: 0.85rem;
  }

  .auth-card {
    border-radius: 6px;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.5rem;
  }

  .course-info h3 {
    font-size: 1rem;
  }

  .course-header h1 {
    font-size: 1.4rem;
  }

  .admin-approve-courses-page {
    padding: 1rem 0.5rem;
  }

  .courses-list {
    grid-template-columns: 1fr !important;
  }

  .page-header h2 {
    font-size: 1.5rem;
  }

  .page-header p {
    font-size: 0.85rem;
  }

  .course-approval-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .course-approval-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}
