/*LG - Dekstop: 2000px - 1791*/
/*breakpoints for large desktops*/
@media (min-width: 1792px) {   
    .html{
        font-size: 14px; 
    } 
    /*main website query*/
    /*welcome query*/
    .ai-character-container {
        max-width: 700px; /* scale image slightly */
        top: 20vh; 
        margin-right: 1.5%;
        margin: 0 auto;
    }

    .chat-container {  
        width: 650px; /* reduce width a bit */
        margin: 0 auto;
    }

    .chat-input-row {
        width: 42%; 
        max-width: 650px;
        margin-right: 6%;
        margin-top: 18%;
    }

    .chat-input-container input {
        font-size: 0.95rem;
    }

    .chat-input-container #send-btn,
    .chat-input-container .mic-button {
        height: 65px;
    }
    /*services query*/
    #services {
        min-height: 100vw !important;
        gap: 5px
    }
    .selected-services-cards {
        grid-template-columns: repeat(3, 1fr); /* 4 equal columns */
        grid-template-rows: repeat(2, auto);
        margin: 0;
    }
}

/*MD - Dekstop: 1791 -1391*/
/*breakpoints for medium desktops*/
@media(max-width: 1396px){
    .html{
        font-size: 10px; 
    } 
    /*main website query*/
    /*register query*/
    .container {
        flex-direction: column;
        height: auto;
    }

    /* Left image takes full width on top */
    .left-image {
        flex: none;
        height: auto; /* limit height */
        justify-content: center;
    }

    .left-image img {
        height: 100%;
        object-fit: cover;
    }

    /*welcome query*/
    #welcome {
        flex-direction: column; /* stack elements vertically if needed */
        justify-content: flex-end;
        align-items: center;
        padding: 60px 3% 40px;
    }
    .ai-character-container {
        max-width: 600px; /* scale down character image */
        top: 25vh;
        margin: 0 auto 20px;
    }
    .chat-container {
        width: 90%;
        width: 600px; /* shrink width to fit layout */
        max-height: 280px;
        margin: 0 auto;
    }

    .chat-input-row {
        width: 42%;
        margin-top: 18%;
        margin-right: 6%;
    }

    #welcome .input-group input {
        height: 55px;
    }

    #welcome .input-group #send-btn,
    #welcome .mic-button {
        height: 60px;
    }

    /*services query*/
    #services {
        min-height: 90vh !important;
    }
    
    .branch-header h2 {
    font-size: 3rem; /* slightly smaller heading */
    }

    .branch-header p {
        font-size: 1rem;
    }

    .branch-details-card {
        max-width: 100%; 
        min-height: 450px; 
        
    }

    .branch-img-container {
        width: 100%;  
        max-width: 300px;
        min-height: 300px;
        height: auto;
    }

    .branch-info {
        margin-left: 20px; /* reduce left spacing */
        padding: 0 0.8rem;
    }

    .branch-info p {
        font-size: 0.95rem;
    }

    .branch-btn {
        font-size: 1rem;
        padding: 14px 18px;
    }

    .view-more-btn {
        font-size: 0.95rem;
        padding: 8px 20px;
    }
    /*b_info query*/
    #branches {
        min-height: 90vh !important;
    }
    #appointment {
        height: auto;
    }
    /* Appointment Section */
    .appointment-container {
        gap: 30px;
        max-width: 500px !important;
    }

    .appointment-info {
        width: 500px;
        height: 580px;
        padding: 18px 28px;
    }

    .appointments-sidebar {
        width: 450px; 
    }
    .appointments-list {
        margin-bottom: 50px !important;
    }
    .services-header h2 {
        font-size: 1.8em;
        margin-top: 80px;
    }
    .appointment-time {
        font-size: 0.5rem;
    }
    

    /* Calendar adjustments */
    .fc .fc-toolbar-title {
        font-size: 1.6rem;
    }

    .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
        font-size: 1.3rem;
    }

    .fc .fc-button {
        font-size: 1.1rem;
    }

    .fc-daygrid-day-number {
        font-size: 0.95rem;
    }

    /* Status legend adjustments */
    .status-legend {
        gap: 10px;
    }

    .status-item {
        font-size: 0.85rem;
    }

    .view-details {
        font-size: 0.95rem;
    }

    .status-legend .book {
        padding: 9px 20px;
        font-size: 0.95em;
        max-width: 170px;
    }
    
    #timeGrid{
        height: 100% !important;
    }
    .time-grid{
        height: 390px !important;
        margin-bottom: 20px !important;
    }
}

/*SM - Tablet: 1396px - 1240px*/
/*breakpoints for small desktops and tablets*/
@media (max-width: 1240px) {
    .html{
        font-size: 6px; 
    } 
    /*main website query*/
    /*welcome query*/
    #welcome {
        flex-direction: column; /* stack elements vertically if needed */
        justify-content: flex-end;
        align-items: center;
        padding: 50px 3% 0.20px;
    }
    .ai-character-container {
        max-width: 600px; /* scale down character image */
        top: 25vh;
        margin: 0 auto 20px;
    }

    .chat-container {
        width: 500px; /* shrink width to fit layout */
        max-height: 280px;
    }

    .chat-input-row {
        width: 42%;
        margin-top: 18%;
        margin-right: 6%;
    }

    #welcome .input-group input {
        height: 55px;
    }

    #welcome .input-group #send-btn,
    #welcome .mic-button {
        height: 60px;
    }
    /*branch info query*/
    #branches {
        min-height: 80vh !important;
    }
     /* Appointment Section */
    #appointment {
        padding: 35px 0 45px 0; /* Adjust padding */
    }
    
    .services-header h2 {
        font-size: 1.7em; /* Smaller services header */
        margin-top: 60px; /* Reduce top margin */
        margin-bottom: 15px;
        letter-spacing: 1px;
    }
    
    .appointment-container {
        gap: 25px; /* Further reduce gap */
        max-width: 95% !important; /* Use more percentage width */
        padding: 0 15px; /* Add side padding */
    }
    
    .appointment-calendar {
        max-width: 550px; /* Smaller max width */
    }
    
    .appointment-calendar h4 {
        font-size: 1.3em; /* Smaller calendar heading */
        letter-spacing: 1px;
    }
    
    .appointment-info {
        max-width: 550px; /* Smaller max width */
        padding: 18px 25px; /* Adjust padding */
        margin-top: 25px; /* Adjust margin */
        height: auto; /* Auto height */
        min-height: 350px; /* Smaller min height */
    }
    
    .appointments-sidebar {
        width: 100%; /* Full width */
    }
    
    /* Calendar Adjustments */
    #calendar {
        padding: 15px; /* Reduce padding */
    }
    
    .fc .fc-toolbar.fc-header-toolbar {
        margin-bottom: 15px; /* Reduce margin */
        flex-wrap: wrap; /* Allow wrapping if needed */
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.4rem; /* Smaller month title */
    }
    
    .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
        font-size: 1.3rem; /* Adjust size */
        margin: 0 10px; /* Reduce margin */
    }
    
    .fc-year-select {
        font-size: 0.85rem; /* Smaller year select */
        padding: 3px 6px;
    }
    
    .fc .fc-button {
        font-size: 1rem; /* Smaller navigation buttons */
    }
    
    .fc .fc-col-header-cell {
        padding: 0.5rem 0; /* Reduce padding */
        font-size: 0.8rem; /* Smaller day headers */
    }
    
    .fc .fc-col-header-cell,
    .fc .fc-daygrid-day {
        max-width: 90px; /* Further reduce day cell max width */
    }
    
    .fc-daygrid-day-number {
        font-size: 0.85rem; /* Smaller day numbers */
        padding: 8px 6px; /* Adjust padding */
        margin-right: 5px;
    }
    
    .fc .fc-daygrid-day-frame {
        padding-bottom: 50%; /* Adjust aspect ratio */
    }
    
    /* Events */
    .fc-event {
        font-size: 0.75rem; /* Smaller event text */
        padding: 2px 6px;
    }
    
    /* Status Legend */
    .status-legend {
        margin-bottom: 15px;
        padding-bottom: 12px;
        gap: 15px; /* Reduce gap */
    }
    
    .status-item {
        font-size: 0.85rem; /* Smaller status text */
    }
    
    .status-dot {
        width: 10px; /* Smaller dots */
        height: 10px;
        margin-right: 8px;
    }
    
    .status-legend .book {
        padding: 8px 20px; /* Adjust button padding */
        font-size: 0.95em;
        max-width: 160px;
    }
    
    /* Appointments List */
    .appointments-list {
        max-height: 400px; /* Reduce max height */
        margin-bottom: 15px;
    }
    
    .appointment-item {
        padding: 10px; /* Adjust padding */
        margin-bottom: 12px;
    }
    
    .appointment-time {
        font-size: 0.85rem; /* Smaller time text */
    }
    
    .appointment-status {
        font-size: 0.8em; /* Smaller status text */
    }
    
    .appointment-name {
        flex-direction: column; /* Stack name and details */
        gap: 5px;
    }
    
    .view-details {
        font-size: 0.9rem; /* Smaller view details */
        margin-top: 0; /* Reset negative margin */
        margin-left: 0; /* Reset margin */
        align-self: flex-start; /* Align to start */
    }
    
    /* Navigation button spacing */
    .fc .fc-button-prev {
        padding-right: 10px;
    }
    
    .fc .fc-button-next {
        padding-left: 10px;
    }
    
    /*footer query*/
    footer{
        padding: 20px 15px;
    }
}

/*SM - Tablet: 1240 - 1120px*/
/*breakpoints for small desktops and tablets*/
@media (max-width: 1120px) {
    .html{
        font-size: 6px; 
    } 
    /*main website query*/
    /*welcome query*/
    #welcome {
        flex-direction: column; /* stack elements vertically if needed */
        justify-content: flex-end;
        align-items: center;
        padding: 40px 3% 0.40px;
    }
    .ai-character-container {
        max-width: 600px; /* scale down character image */
        top: 30vh;
        margin: 0 auto 20px;
    }

    .chat-container {
        width: 400px; /* shrink width to fit layout */
        max-height: 280px;
    }

    .chat-input-row {
        width: 42%;
        margin-top: 18%;
        margin-right: 6%;
    }

    #welcome .input-group input {
        height: 50px;
    }

    #welcome .input-group #send-btn,
    #welcome .mic-button {
        height: 55px;
    }
    /*services query*/
    #services {
        min-height: 80vh !important;
    }
    .selected-services-cards {
        grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
        grid-template-rows: repeat(3, auto);
        margin: 0;
        gap: 20px;
        width: 30%;
    }
    /*branch info query*/
    #branches {
        min-height: 70vh !important;
    }
    #appointment {
        height: auto;
    }
    .appointment-container {
        flex-direction: column;
        gap: 20px;
    }
    .appointment-info {
        width: 60%;
        max-width: 500px;
        margin: 10px auto;
    }
    .appointments-sidebar {
        max-width: 350px;
       
    }

    .appointment-calendar {
        width: 70%;
        max-width: 400px;
        margin: 0 auto;
    }
    .appointment-calendar h4 {
        font-size: 1.2rem;
    }
    .services-header h2 {
        font-size: 2rem;
    }
    .services-header {
        margin-bottom: 15px;
    } 
    
    #timeGrid{
        width: 300px !important;
        height: 100% !important;
    }
    .time-grid{
        width:  300px !important;
        height: 390px !important;
        margin-bottom: 20px !important;
    }

    /* Booking form reduction */
    .appointment-form-container {
        padding: 20px;
        max-width: 620px !important;
        transform: scale(0.95);
        margin: 0 auto;
        overflow-x: hidden !important; 
    }
    .appointment-form-container h2 {
        font-size: 1.5rem;
    }
    #branch_id{
        margin-top: 10px;
        max-width: 150px;
    }
    .branch{
        left: 28%;
    }
    /*footer query*/
    footer{
        padding: 20px  15px;
    }
    
}

/*XS - Mobile: 1024px - 400px*/
/*breakpoints for mobile devices*/
@media(max-width: 840px){
    .html{
        font-size: 5px; 
    } 
    /*main website query*/
    /*welcome query*/
    #welcome {
        flex-direction: column; /* stack elements vertically if needed */
        justify-content: flex-end;
        align-items: center;
        padding: 30px 3% 0.10px;
    }
    .ai-character-container {
        max-width: 600px; /* scale down character image */
        top: 35vh;
        margin: 0 auto 20px;
    }

    .chat-container {
        width: 350px; /* shrink width to fit layout */
        max-height: 280px;
    }

    .chat-input-row {
        width: 42%;
        margin-top: 18%;
        margin-right: 6%;
    }

    #welcome .input-group input {
        height: 45px;
    }

    #welcome .input-group #send-btn,
    #welcome .mic-button {
        height: 50px;
    }
    /*services query*/
    #services {
        min-height: 70vh !important;
    }
    .selected-services-cards {
        grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
        grid-template-rows: repeat(3, auto);
        margin: 0;
        gap: 15px;
        width: 50%;
    }
    /*branch info query*/
    #branches {
        min-height: 60vh !important;
    }
    #appointment {
        height: auto;
    }
    .appointment-container {
        flex-direction: column;
        gap: 20px;
    }
    .appointment-info {
        width: 60%;
        max-width: 370px;
        margin: 10px auto;
    }
    .appointments-sidebar {
        max-width: 350px;
       
    }

    .appointment-calendar {
        width: 70%;
        max-width: 400px;
        margin: 0 auto;
    }
    .appointment-calendar h4 {
        font-size: 1.2rem;
    }
    .services-header h2 {
        font-size: 2rem;
    }
    .services-header {
        margin-bottom: 15px;
    } 
    .status-legend .book {
        padding: 5px 10px;
        font-size: 0.6rem;
        max-width: 90px;
    }
    /* Booking form reduction */
    .appointment-form-container {
        padding: 20px;
        max-width: 550px !important;
        transform: scale(0.95);
        margin: 0 auto;
        overflow-x: hidden !important; 
    }
    .appointment-form-container h2 {
        font-size: 1.5rem;
    }

    #branch_id{
        margin-top: 10px;
        max-width: 150px;
        
    }
    .appointment-form-container.h3{
        position: relative;
        margin-right: auto !important;

    }
    .branch{
        left: 25%;
    }
    /*footer query*/
    footer {
        padding: 2px 1.3% 2px;  
    } 
    
    .footer .footer-links a {
        font-size: 0.8rem;
    }
}

@media (max-width: 730px) {
    .html {
        font-size: 4px; 
    }
    
    /*main website query*/
    /*login and register query*/
    .signup-title {
        margin-top: 38px !important;
    }
    /*welcome query*/ 
    #welcome {
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        padding: 30px 3% 0.10px;
    }
    #welcome h2 {
        font-size: 1.2rem;
    }
    
    .ai-character-container {
        max-width: 600px; /* scale down character image */
        top: 30vh;
        margin: 0 auto 20px;
    }

    .chat-container {
        width: 90%;
        max-width: 320px;
        max-height: 280px;
        margin: 0 auto; /* Center the chat container */
        position: relative;
        left: 10px;
        transform: none;
    }

    .chat-input-row {
        width: 50%;
        margin-top: 20px;
        margin-right: 10px;
    }

    #welcome .input-group input {
        height: 45px;
        width: 50%;
    }

    #welcome .input-group #send-btn,
    #welcome .mic-button {
        height: 50px;
        width: 50px;
    }
    #toggleSpeech{
        margin-bottom: auto;
    }
    /*services query*/
    #services {
        min-height: 60vh !important;
        padding: 20px 0;
    }
    
    .selected-services-cards {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, auto);
        margin: 0 auto;
        gap: 15px;
        width: 90%;
    }
    
    .service-card {
        transform: scale(0.9); /* Reduce service card size */
        margin: 0 auto;
    }
    
    
    
    /*branch info query*/
    #branches {
        min-height: 50vh !important;
    }
    
    #appointment {
        height: auto;
        padding: 20px 0;
    }

    .appointment-container {
        flex-direction: column;
        gap: 20px;
    }
    .appointment-info {
        width: 60%;
        max-width: 500px !important;
        margin: 10px auto;
    }
    .appointments-sidebar {
        max-width: 350px;
       
    }

    .appointment-calendar {
        width: 70%;
        max-width: 400px;
        margin: 0 auto;
    }
    .appointment-calendar h4 {
        font-size: 1.2rem;
    }
    .services-header h2 {
        font-size: 2rem;
    }
    .services-header {
        margin-bottom: 15px;
    } 
    .status-legend .book {
        padding: 5px 10px;
        font-size: 0.6rem;
        max-width: 90px;
    }
    /* Booking form reduction */
    .appointment-form-container {
        padding: 20px;
        max-width: 550px !important;
        transform: scale(0.95);
        margin: 0 auto;
    }
    .appointment-form-container h2 {
        font-size: 1.5rem;
    }

    #branch_id{
        margin-top: 10px;
        max-width: 150px;
        
    }
    .branch{
        left: 25%;
    }
    /*about us*/
    #about-us {
        overflow-x: hidden;
    }
    .contact-info {
        display: flex;
        flex-direction: column;  /* stack items vertically */
        align-items: center;     /* center them horizontally */
    }
    .contact-container {
        display: flex;
        flex-direction: column;  /* stack vertically */
        align-items: center;     /* center icons horizontally */
    }

    .contact-icon {
        width: 100%;
        max-width: 400px;   /* prevents stretching too wide */
        margin-bottom: 40px; /* spacing between items */
    }

    .contact-icon p {
        text-align: center; /* center text under icon */
    }
}

@media (max-width: 670px) {
    .html {
        font-size: 2px; 
    }
    
    /* Mobile Navigation - Hamburger Menu */
    .nav-menu {
        display: none;
        width: 85% !important;
        max-width: 290px;
    }
    
    .hamburger-menu {
        display: none;
        flex-direction: column;
        justify-content: center;   /* vertically center the lines */
        align-items: center;
        position: fixed;
        top: 5px;
        right: 10px;
        z-index: 1000;
        background: #009ca6;
        width: 40px;
        height: 40px;
        border-radius: 5px;
        cursor: pointer;
        padding: 8px;
    }

    
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: auto;
        right: 0;
        width: 85% !important;
        max-width: 280px;
        height: 100vh;
        background: rgba(0, 155, 166, 0.767) !important;
        z-index: 999 !important;
        padding: 60px 0 20px; /* Removed right/left padding */
        overflow-y: auto;
        overflow-x: hidden !important;
        transform: translateX(0) !important;
        align-items: flex-start !important; 
    }
    
    .nav-menu.active a {
        display: block;
        margin: 8px 0;
        width: 100% !important; /* Changed from 80% to 100% */
        font-size: 1.2rem;
        color: white !important;
        text-align: left !important; 
        padding: 12px 40px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        box-sizing: border-box; 
    }
    
    /*main website query*/
    /*welcome query*/
    #welcome {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 30px 3% 0.10px;
        overflow-x: hidden; 
    }
    
    .ai-character-container {
        max-width: 600px; 
        top: 32vh;
        right: 20px;
        margin: 0 auto 15px;
    }

    .chat-container {
        width: 90%;
        max-width: 320px;
        max-height: 280px;
        margin: 0 auto; 
        position: relative;
        top: 20px;
        left: 0;
        transform: none;
        overflow-x: hidden; 
    }

    .chat-input-row {
        width: 50%;
        margin-top: 20px;
        margin-right: 20px;
        margin-bottom: 20px;
    }

    #welcome .input-group input {
        height: 45px;
        width: 50%;
    }

    #welcome .input-group #send-btn,
    #welcome .mic-button {
        height: 40px;
        width: 40px;
    }
    #toggleSpeech {
        margin-bottom: 20px !important;
    }

    /*services query*/
    #services {
        min-height: 60vh !important;
        padding: 20px 0;
        overflow-x: hidden; /* Added to prevent horizontal scroll */
    }
    
    .selected-services-cards {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, auto);
        margin: 0 auto;
        gap: 15px;
        width: 90%;
    }
    
    .service-card {
        transform: scale(0.9); /* Reduce service card size */
        margin: 0 auto;
        max-width: 100%; /* Added to prevent overflow */
    }
    .services-header p{
        font-size: 0.5rem;
    }
    
    /* About Us section reduction */
    #about-us {
        padding: 20px 0;
    }
    
    #about-us .about-content {
        padding: 10px;
    }
    .contact-header img{
        width: 100%;
        height: auto;

    }
    #about-us h2 {
        font-size: 1.5rem;
    }
    
    #about-us p {
        font-size: 0.9rem;
    }
    /*branch info query*/
    #branches {
        min-height: 50vh !important;
        overflow-x: hidden; /* Added to prevent horizontal scroll */
    }
    
    .appointment-container {
        flex-direction: column;
        gap: 20px;
    }
    .appointment-info {
        width: 60%;
        max-width: 270px;
        margin: 10px auto;
    }
    .appointments-sidebar {
        max-width: 350px;
       
    }

    .appointment-calendar {
        width: 70%;
        max-width: 400px;
        margin: 0 auto;
    }
    .appointment-calendar h4 {
        font-size: 1.2rem;
    }
    .services-header h2 {
        font-size: 2rem;
    }
    .services-header {
        margin-bottom: 15px;
    } 
    .status-legend .book {
        padding: 5px 10px;
        font-size: 0.5rem;
        max-width: 90px;
    }

    
    /* Booking form reduction */
    .appointment-form-container {
        padding: 20px;
        max-width: 520px !important;
        transform: scale(0.9);
        margin: 0 auto;
        overflow-x: hidden !important; /* Added to prevent horizontal scroll */
        box-sizing: border-box; /* Added to include padding in width */
    }
    
    .appointment-form-container h2 {
        font-size: 1.5rem;
    }

    #branch_id {
        margin-top: 10px;
        max-width: 150px;
    }
    .branch{
        left: 20%;
    }
    /* Ensure all form elements don't exceed container width */
    .appointment-form-container input,
    .appointment-form-container select,
    .appointment-form-container textarea {
        max-width: 100%;
        box-sizing: border-box;
    }
    
   /*footer query*/
    footer {
        padding: 4px 1.3% 2px;
        overflow-x: hidden;
    } 
    
    .footer .footer-links a {
        font-size: 0.8rem;
    }      
}

@media (max-width: 570px) {
    .html {
        font-size: 2px; 
    }
    
    /* Mobile Navigation - Hamburger Menu */
    .nav-menu {
        display: none;
        width: 85% !important;
        max-width: 290px;
    }
    
    .hamburger-menu {
        display: block;
        position: fixed;
        top: 5px;
        left: auto;
        right: 10px;
        z-index: 1000;
        background: #009ca6 !important;
        width: 40px;
        height: 40px;
        border-radius: 5px;
        padding: 8px;
        cursor: pointer;
        overflow-x: hidden !important;
    }
    
    .hamburger-menu span {
        display: block;
        height: 3px !important;
        background: white !important;
        margin: 2px 0 !important;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: auto;
        right: 0;
        width: 85% !important;
        max-width: 280px;
        height: 100vh;
        background: rgba(0, 155, 166, 0.767) !important;
        z-index: 999 !important;
        padding: 60px 0 20px; /* Removed right/left padding */
        overflow-y: auto;
        overflow-x: hidden !important;
        transform: translateX(0) !important;
        align-items: flex-start !important; 
    }
    
    .nav-menu.active a {
        display: block;
        margin: 8px 0;
        width: 100% !important; /* Changed from 80% to 100% */
        font-size: 1.2rem;
        color: white !important;
        text-align: left !important; 
        padding: 12px 40px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        box-sizing: border-box; 
    }
    
    /*main website query*/
    /*welcome query*/
    #welcome {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 30px 3% 0.10px;
        overflow-x: hidden; 
    }
    
    .ai-character-container {
        display: none;
    }

    .chat-container {
        width: 80%;
        max-width: 320px;
        max-height: 280px;
        margin: 0 auto; 
        position: relative;
        top: 20px;
        left: 0;
        transform: none;
        overflow-x: hidden; 
    }

    .chat-input-row {
        width: 80%;
        margin-top: 50px;
        margin-right: 0;
    }

    #welcome .input-group input {
        height: 45px;
        width: 40%;
    }

    #welcome .input-group #send-btn,
    #welcome .mic-button {
        height: 50px;
        width: 50px;
    }
    /*branch query*/
    #branch {
        padding: 60px 0;
        min-height: auto;
    }
    
    /* Header Styles */
    .branch-header h2 {
        font-size: 2.5rem !important;
        text-align: center;
    }
    
    .branch-header p {
        font-size: 1rem !important;
        text-align: center;
        padding: 0 15px;
    }
    
    /* Layout Adjustments */
    .services_container {
        flex-direction: column;
        padding: 0 15px;
    }
    
    /* Button List Styles */
    .branch-list {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-bottom: 25px;
    }
    
    .branch-btn {
        border-radius: 6px !important;
        padding: 12px 15px;
        font-size: 0.95rem;
        text-align: center;
        flex: 1;
        min-width: 120px;
        max-width: 550px;
    }
    
    .branch-btn:hover, 
    .branch-btn.active {
        transform: translateY(3px);
    }
    
    .branch-btn::after {
        display: none; /* Hide the arrow indicator on mobile */
    }
    
    /* Card Styles */
    .branch-details-card {
        min-height: auto;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .branch-img-container {
        width: 100% !important;
        height: 250px !important;
        padding-bottom: 0;
        margin: 0 auto;
    }
    
    .branch-img {
        position: relative;
        height: 100%;
        width: 100%;
        margin-top: 0;
    }
    
    .branch-info {
        margin-left: 0;
        padding: 20px 15px;
    }
    
    .branch-info p {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
    
    .view-more-btn {
        width: 100%;
        margin-top: 15px;
        padding: 12px;
    }
    
    /* Specific adjustments for branch cards */
    .branch-details-card .row {
        flex-direction: column;
    }
    
    .branch-details-card .col-md-8,
    .branch-details-card .col-md-4 {
        width: 100%;
        max-width: 100%;
    }
    /*services query*/
    #services {
        min-height: 60vh !important;
        padding: 20px 0;
        overflow-x: hidden; /* Added to prevent horizontal scroll */
    }
    
    .selected-services-cards {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, auto);
        margin: 0 auto;
        gap: 15px;
        width: 90%;
    }
    
    .service-card {
        transform: scale(0.9); /* Reduce service card size */
        margin: 0 auto;
        max-width: 100%; /* Added to prevent overflow */
    }
    .services-header p{
        font-size: 0.5rem;
    }
    
    /* About Us section reduction */
    #about-us {
        overflow-x: hidden;
    }
    .contact-info {
        margin-top: -140px !important; /* less negative margin for better balance */
        margin-left: 90px !important;
    }

    .contact-info .contact-icon {
        max-width: 300px;
        margin-bottom: 15px; /* tighter spacing between sections */
    }

    .contact-info .contact-icon i {
        width: 65px;
        height: 65px;
        font-size: 1.4rem; /* smaller icon */
        margin-bottom: 15px; /* reduce extra gap */
    }

    .contact-info .contact-icon h3 {
        font-size: 0.95rem; /* smaller heading */
        margin-bottom: 5px;
    }

    .contact-info .contact-icon p {
        font-size: 0.85rem;
        text-align: center;
        margin-bottom: 5px;
        margin: 20px !important;
    }
    
    /*branch info query*/
    #branches {
        min-height: 50vh !important;
        overflow-x: hidden; /* Added to prevent horizontal scroll */
    }
    
    .appointment-container {
        flex-direction: column;
        gap: 20px;
    }
    .appointment-info {
        width: 60%;
        max-width: 200px;
        margin: 10px auto;
    }
    .appointments-sidebar {
        max-width: 350px;
       
    }

    .appointment-calendar {
        width: 70%;
        max-width: 400px;
        margin: 0 auto;
    }
    .appointment-calendar h4 {
        font-size: 1.2rem;
    }
    .services-header h2 {
        font-size: 2rem;
    }
    .services-header {
        margin-bottom: 15px;
    } 
    .status-legend .book {
        padding: 5px 10px;
        font-size: 0.6rem;
        max-width: 90px;
    }
    
    #timeGrid{
        height: 100% !important;
    }
    .time-grid{
        height: 200px !important;
        margin-bottom: 20px !important;
    }
    
    /* Booking form reduction */
    .appointment-form-container {
        padding: 20px;
        max-width: 520px !important;
        transform: scale(0.9);
        margin: 0 auto;
        overflow-x: hidden !important; /* Added to prevent horizontal scroll */
        box-sizing: border-box; /* Added to include padding in width */
    }
    
    .appointment-form-container h2 {
        font-size: 1.5rem;
    }

    #branch_id {
        margin-top: 10px;
        max-width: 150px;
    }
   .branch{
        left: 20%;
    }
    
   /*footer query*/
    footer {
        padding: 4px 1.3% 2px;
        overflow-x: hidden;
    } 
    
    .footer .footer-links a {
        font-size: 0.8rem;
    }      
}

@media (max-width: 400px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .html {
        font-size: 2px; 
    }
    
    /* Mobile Navigation - Hamburger Menu */
    .nav-menu {
        display: none;
        width: 85% !important;
        max-width: 290px;
    }
    
    .hamburger-menu {
        display: block;
        position: fixed;
        top: 5px;
        left: auto;
        right: 10px;
        z-index: 1000;
        background: #009ca6 !important;
        width: 40px;
        height: 40px;
        border-radius: 5px;
        padding: 8px;
        cursor: pointer;
        overflow-x: hidden !important;
    }
    
    .hamburger-menu span {
        display: block;
        height: 3px !important;
        background: white !important;
        margin: 1px 0 !important;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: auto;
        right: 0;
        width: 85% !important;
        max-width: 280px;
        height: 100vh;
        background: rgba(0, 155, 166, 0.767) !important;
        z-index: 999 !important;
        padding: 60px 0 20px; /* Removed right/left padding */
        overflow-y: auto;
        overflow-x: hidden !important;
        transform: translateX(0) !important;
        align-items: flex-start !important; 
    }
    
    .nav-menu.active a {
        display: block;
        margin: 8px 0;
        width: 100% !important; /* Changed from 80% to 100% */
        font-size: 1.2rem;
        color: white !important;
        text-align: left !important; 
        padding: 12px 40px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        box-sizing: border-box; 
    }
    
    /*main website query*/
    /*welcome query*/
    #welcome {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 30px 3% 0.10px;
        overflow-x: hidden;
    }
    
    .ai-character-container {
        display: none;
    }

    .chat-container {
        width: 90%;
        max-width: 320px;
        max-height: 280px;
        margin: 0 auto;
        position: relative;
        left: 0;
        transform: none;
        overflow-x: hidden;
    }

    .chat-input-row {
        width: 50%;
        margin-top: 20px;
        margin-right: 23px !important;
    }

    #welcome-header h2 {
        font-size: 0.8rem;  /* smaller font */
        line-height: 1.3;
    }
    #welcome .input-group input {
        height: 45px;
        width: 50%;
    }

    #welcome .input-group #send-btn,
    #welcome .mic-button {
        height: 50px;
        width: 50px;
    }
    
    /*services query*/
    #services {
        min-height: 60vh !important;
        padding: 20px 0;
        overflow-x: hidden;
    }
    
    .selected-services-cards {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, auto);
        margin: 0 auto;
        gap: 15px;
        width: 90%;
    }
    
    .service-card {
        transform: scale(0.9);
        margin: 0 auto;
        max-width: 100%;
    }
    .services-header p{
        font-size: 0.5rem;
        text-align: center;
    }
    
    /* About Us section reduction */
    #about-us {
        padding: 20px 0;
        overflow-x: hidden;
    }
    .contact-info {
        margin-top: -140px !important; /* less negative margin for better balance */
        margin-left: 20px !important;
    }
    .contact-header img{
        width: 100%;
        height: auto;

    }
    #about-us .about-content {
        padding: 15px;
        max-width: 100%;
    }
    
    #about-us h2 {
        font-size: 1.5rem;
    }
    
    #about-us p {
        font-size: 0.9rem;
        padding: 10px;
        text-align: center;
    }
    
    /*branch info query*/
    #branches {
        min-height: 50vh !important;
        overflow-x: hidden;
    }
    
    #appointment {
        height: auto;
        padding: 20px 0;
        overflow-x: hidden;
    }
    
    /* Appointment Section */
    #appointment {
        height: auto;
        padding: 30px 0 40px 0;
    }
    
    .services-header h2 {
        font-size: 1.5em;
        margin-top: 50px;
        margin-bottom: 15px;
    }
    
    .appointment-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
    }
    
    .appointment-calendar h4 {
        font-size: 1.2em;
        margin: 5px auto;
    }
    
    /* Calendar adjustments */
    #calendar {
        padding: 15px;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.3rem;
    }
    
    .fc .fc-button {
        font-size: 1rem;
    }
    
    .fc-daygrid-day-number {
        font-size: 0.6rem !important;
        padding: 5px;
    }
    
    /* Appointment Info Card */
    .appointment-info {
        max-width: 200px;
        height: auto;
        padding: 15px 20px;
        margin-top: 20px;
    }
    
    .appointments-sidebar {
        width: 100%;
    }
    
    .status-legend {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .status-legend .book {
        margin-left: 0;
        margin-top: 10px;
        max-width: 100%;
        width: 100%;
    }
    
    .appointment-item {
        padding: 7px;
    }
    
    .appointment-name {
        flex-direction: column;
        gap: 5px;
    }
    
    .view-details {
        margin-left: 0;
        margin-top: 0;
        align-self: flex-start;
    }
    
    /* Calendar header adjustments for small screens */
    .fc .fc-toolbar.fc-header-toolbar {
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
        font-size: 1.2rem;
        margin: 0 5px;
    }
    
    .fc .fc-col-header-cell {
        font-size: 0.5rem;
        padding: 0.5rem 0;
    }
    .fc-toolbar-title{
        font-size: 0.5rem !important;
    }
    
    #timeGrid{
        width: 170px !important;
        height: 100% !important;
    }
    .time-grid{
        height: 150px !important;
        margin-bottom: 20px !important;
    }
    /* Booking form reduction */
    .appointment-form-container {
        padding: 20px;
        max-width: 320px !important;
        transform: scale(0.95);
        margin: 0 auto;
        overflow-x: hidden !important;
        box-sizing: border-box;
    }
    
    .appointment-form-container h2 {
        font-size: 1.5rem;
    }

    #branch_id {
        margin-top: 10px;
        max-width: 150px;
    }
    .branch{
        left: 8%;
    }
    /*footer query*/
    footer {
        padding: 4px 1.3% 2px;
        overflow-x: hidden;
    } 
    
    .footer .footer-links a {
        font-size: 0.8rem;
    }     
}