@media only screen and (min-width: 768px) {
   /* Hide the menu toggle icons on desktop */
   .fa-bars, 
   .fa-xmark {
       display: none !important;
   }

   /* Ensure nav ul is visible normally */
   nav ul {
       position: static !important;
       width: auto !important;
       height: auto !important;
       display: flex !important;
       background: transparent !important;
   }
}


/*------ css for small screens------*/


@media only screen and (max-width: 767px){
   /* Ensure no horizontal scrolling */
   html, body {
      overflow-x: hidden !important;
      max-width: 100vw !important;
  }
    body {
        overflow-x: hidden; /* Prevent horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Enables smooth momentum-based scrolling on mobile */
    }
    .header-text{
        margin-top: 100%;
        font-size: 16px;
    }
    #header{
       background-position: calc(100% + 160px) center;
    }
    .header-text h1{
        font-size: 30px;
    }
    nav .fa-solid{
        display: block;
        font-size: 25px ;
    } 
    nav ul{
        background: #ff004f;
        position: fixed;
        top: 0;
        right: -200px ;
        width: 200px;
        height: 100vh;
        padding-top: 50px;
        z-index: 2;
        transition: right 0.5s;
    }
    nav ul li{
        font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
        display: block;
        margin: 25px ;
    }
    nav ul .fa-solid{
        position: absolute;
        top: 25px;
        left: 25px;
        cursor: pointer;
    }
    /* Hide menu off-screen by default */
#sidemenu {
    position: fixed;
    top: 0;
    right: -100vw; /* Fully hidden */
    overflow-x: hidden;
    display: none;
    width: 200px;
    height: 100vh;
    background: linear-gradient(to bottom, #231212, transparent);
    transition: right 0.5s ease-in-out;
    z-index: 1000;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
 }
 
 /* Show menu when active */
 #sidemenu.active {
    right: 0;
     opacity: 1;
 }
 /* Initially hide and position menu items off-screen */
 #sidemenu li {
    list-style: none;
    margin: 20px 40px;
    opacity: 0;
    transform: translateX(50px); /* Start slightly off-screen */
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
 }
 
 /* Animate menu items when the menu opens */
 #sidemenu.active li {
    opacity: 1;
    transform: translateX(0); /* Move into view */
 }
 /* Add staggered effect for each menu item */
 #sidemenu.active li:nth-child(1) {
    transition-delay: 0.1s;
 }
 #sidemenu.active li:nth-child(2) {
    transition-delay: 0.2s;
 }
 #sidemenu.active li:nth-child(3) {
    transition-delay: 0.3s;
 }
 #sidemenu.active li:nth-child(4) {
    transition-delay: 0.4s;
 }
 #sidemenu.active li:nth-child(5) {
    transition-delay: 0.5s;
 }
 
 /* Ensure menu toggle button is visible */
 .fa-bars {
    position: fixed;
    /* top: 20px; */
    right: 20px;
    padding: 10px 5%;
    font-size: 18px;
    cursor: pointer;
    z-index: 1101;
    color: white;
    display: block; /* Show by default */
 }
 
 /* Close button inside menu */
 .fa-xmark {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 18px;
    cursor: pointer;
    color: white;
    display: none; /* Hide by default */
 }
 
  /* When menu is open, show `fa-xmark` and hide `fa-bars` */
  #sidemenu.active ~ .fa-bars {
    display: none;
}

#sidemenu.active .fa-xmark {
    display: block;
}
 
    #about {
       padding: 40px 0 ;
   }
 
   .row {
       flex-direction: column;
       align-items: flex-start;
   }
 
   .about-col-1, .about-col-2 {
       flex-basis: 100%;
       width: 100%;
   }
 
   .about-col-1 img {
       display: block;
       margin-bottom: 20px;
       width: 100%;
   }
 
   .about-col-2 {
       padding: 0 10px 70px 0;
       text-align: left;
   }
 
   .sub-title {
       font-size: 30px;
   }
 
   hr {
       width: 50%;
   }
 
   /* Styled scrollable tab-titles */
   .tab-container {
    position: relative;
    overflow: hidden; /* Ensures fade effect works properly */
 }
 
 .tab-titles {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: #00a8cc #333;
    scroll-behavior: smooth;
    padding-bottom: 5px;
    scroll-snap-type: x mandatory;
    position: relative;
 }
 
 .tab-titles::-webkit-scrollbar {
    height: 5px;
 }
 
 .tab-titles::-webkit-scrollbar-thumb {
    background: #00a8cc;
    border-radius: 10px;
 }
 
 .tab-titles::-webkit-scrollbar-track {
    background: #333;
 }
 
 .tab-links {
    font-size: 16px;
    margin-right: 20px;
    flex-shrink: 0;
    padding: 10px 15px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    scroll-snap-align: center;
 }
 
 .tab-links.active-link {
    font-weight: bold;
    color: #00a8cc;
    transform: scale(1.1);
 }
 
 /* Gradient Fade Effect on Text */
 .tab-container::before,
 .tab-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 50px;
    height: 100%;
    pointer-events: none;
    z-index: 2;
 }
 
 /* Left Fade */
 .tab-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(35, 18, 18, 1), rgba(35, 18, 18, 0));
 }
 
 /* Right Fade */
 .tab-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(35, 18, 18, 1), rgba(35, 18, 18, 0));
 }
 
 
 
 
 
    .contact-left, .contact-right{
        flex-basis: 100%;
    }
    .copyright{
        font-size: 14px;
    }
 
    #msg{
       color: #61b752;
       margin-top: -10px;
       display: block;
    }
 }



 /* Media queries for tablet screens (768px - 1024px) */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    
   /* General Styles */
   body {
       font-size: 16px;
   }

   .container {
       padding: 20px 5%;
   }

   /* Navigation */
   nav ul {
       display: flex;
       flex-direction: row;
       justify-content: space-around;
       width: 100%;
   }

   .fa-bars, .fa-xmark {
       display: none !important;
   }

   /* Header */
   .header-text {
       font-size: 18px;
       text-align: left;
       align-self: center;
   }

   .header-text h1 {
       font-size: 40px;
   }

   /* About Section */
   .row {
       flex-direction: column;
       align-items: center;
       text-align: center;
   }

   .about-col-1, .about-col-2 {
       flex-basis: 100%;
       width: 90%;
   }

   .about-col-1 img {
       width: 80%;
       margin: 0 auto;
   }
   hr, .sub-title{
      justify-self: center;
   }


   /* Services Section */
   .services-list {
       grid-template-columns: repeat(2, 1fr);
       grid-gap: 20px;
   }

   .services-list div {
       padding: 20px;
   }

   /* Portfolio */
   .work-list {
       grid-template-columns: repeat(2, 1fr);
   }

   /* Contact Section */
   .contact-left, .contact-right {
       flex-basis: 100%;
       text-align: center;
   }

   .social-icons {
       justify-content: center;
   }

   form input, form textarea {
       width: 90%;
   }
}
