/* **********************Login-Page********************************** */
@media only screen and (min-width: 300px) and (max-width: 1024px) {
    .container-login100 {
        -webkit-animation: slideinMobile 100s !important;
        animation: slideinMobile 100s !important;
      
        -webkit-animation-fill-mode: forwards;
        animation-fill-mode: forwards;
      
        -webkit-animation-iteration-count: infinite;
        animation-iteration-count: infinite;
      
        -webkit-animation-direction: alternate;
        animation-direction: alternate; 
      }
}

@media only screen and (min-width: 300px) and (max-width: 1024px) {
    #sidebar{
        display: none;
    }

    #sidebar.hide ~ #content {
        width: 100% !important;
        left: 0 !important;
    }

    #content{
        width: 100% !important;
        left: 0 !important;
    }

    .icon-container{
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 1rem !important;
    }

    .post-calender{
        margin: 0 !important;
    }

    .search-container{
        margin-top: 20px;
    }

    .bx-menu{
        z-index: 8000;
    }

    .mobile-sidebar {
        position: fixed;
        height: 100%;
        width: 260px;
        background: #11101d;
        padding: 15px;
        z-index: 50000;
        display: block !important;
        left: 0px;
        transition: all 0.8s ease;
      }

      .mobile-sidebar .logo-cross{
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .mobile-sidebar .logo-cross .cross::after{ 
        content: "✖";
        font-size: 16px;
        color: #fff;
      }


      .mobile-sidebar .logo {
        font-size: 25px;
        padding: 0 15px;
      }

      .mobile-sidebar a {
        color: #fff;
        text-decoration: none;
      }
      .menu-content {
        position: relative;
        height: 100%;
        width: 100%;
        margin-top: 40px;
        overflow-y: scroll;
      }
      
      .menu-items {
        height: 100%;
        width: 100%;
        list-style: none;
        transition: all 0.4s ease;
      }
      .submenu-active .menu-items {
        transform: translateX(-56%);
      }
      .menu-title {
        color: #fff;
        font-size: 14px;
        padding: 15px 20px;
      }
      .item a,
      .submenu-item {
        padding: 16px;
        display: inline-block;
        width: 100%;
        border-radius: 12px;
      }
      .item i {
        font-size: 12px;
      }
      .item a:hover,
      .submenu-item:hover,
      .submenu .menu-title:hover {
        background: rgba(255, 255, 255, 0.1);
      }
      .submenu-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #fff;
        cursor: pointer;
      }
      .submenu {
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
        right: calc(-100% - 26px);
        height: calc(100% + 100vh);
        background: #11101d;
        display: none;
      }
      .show-submenu ~ .submenu {
        display: block;
      }
      .submenu .menu-title {
        border-radius: 12px;
        cursor: pointer;
      }
      .submenu .menu-title i {
        margin-right: 10px;
      }
      .navbar,
      .main {
        left: 260px;
        width: calc(100% - 260px);
        transition: all 0.5s ease;
        z-index: 1000;
      }
      .sidebar.close ~ .navbar,
      .sidebar.close ~ .main {
        left: 0;
        width: 100%;
      }
      .navbar {
        position: fixed;
        color: #fff;
        padding: 15px 20px;
        font-size: 25px;
        background: #4070f4;
        cursor: pointer;
      }
      .navbar #sidebar-close {
        cursor: pointer;
      }
      .main {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 100;
        background: #e7f2fd;
      }
      .main h1 {
        color: #11101d;
        font-size: 40px;
        text-align: center;
      }

      .pagination-container .pagination li a {
        padding: 17px 10px;
    }

    #content main .head-title .btn-create {
      margin-bottom: 15px;
  }

  .form-container{
    display: block;
  }

  .form-container .cancel-button{
    display: block;
    }

    .one-card-container{
      width: 100%;
    }

}

@media (max-width: 768px) {
  /* Container stacking */
  .student_container {
    flex-direction: column;
    padding: 0;
    padding-top: 20px;
  }

  .profile-card,
  .main-section {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  /* Tabs stacking vertically */
  .tabs_student {
    flex-direction: column;
    gap: 10px;
  }

  .tab_student {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 16px;
  }

  /* Tables scroll horizontally */
  .document_container table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .document_container .d-flex {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  /* Modal adjusts width */
  .modal-content {
    width: 95% !important;
    padding: 15px;
  }

  /* Pivot data fields stack */
  .pivot-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 10px;
  }

  .pivot-row input,
  .pivot-row button {
    width: 100%;
  }

  /* Comment section full width */
  .comment-form textarea {
    width: 100%;
    font-size: 14px;
  }

  .comment-form button {
    width: 100%;
    margin-top: 10px;
  }

  /* Avatar center */
  .avatar {
    margin: 0 auto;
  }

  /* Download modal text center */
  #downloadModal .modal-content {
    text-align: center;
  }

  /* File upload inputs full width */
  #fileUpload,
  #fileUpload_edit,
  #fileName,
  #editFileName,
  select {
    width: 100%;
  }

  /* Smaller buttons */
  button {
    font-size: 14px;
    padding: 8px 10px;
  }
}

@media (max-width: 768px) {
  /* Hide profile card by default on mobile */
  .profile-card {
    display: none;
  }

  /* Show when toggled */
  .profile-card.show {
    display: block;
    margin-top: 15px;
    padding: 10px;
  }

  .profile-toggle-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 10px;
    font-size: 16px;
    cursor: pointer;
  }
}

/* Desktop: Always show */
@media (min-width: 769px) {
  .profile-toggle-btn {
    display: none;
  }

  .profile-card {
    display: block !important;
  }
}

