/**
 * Il Brigante Barbershop - Mobile Styles
 * This file contains mobile-specific styles to improve the responsive layout and user experience
 */

/* ===== GLOBAL MOBILE ADJUSTMENTS ===== */
@media (max-width: 992px) {
  html {
    font-size: 15px; /* Slightly reduce base font size */
  }
  
  .container {
    padding: 0 15px; /* Reduce container padding */
    width: 100%;
  }
  
  /* Reduce section spacing on mobile */
  .section {
    padding: 50px 0;
  }
  
  .row {
    margin: 0 -10px;
  }
  
  .col, .col-half, .col-third, .col-quarter {
    padding: 0 10px;
    margin-bottom: 20px;
  }
}

/* ===== IMPROVED HEADER & NAVIGATION MOBILE FIXES ===== */
@media (max-width: 992px) {
  /* Ensure header is always visible and properly styled */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Background now controlled by main.js via .scrolled class */
    background-color: transparent;
    z-index: 990;
    padding: 10px 0;
    transition: all 0.3s ease;
  }
  
  .header.scrolled {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Make logo smaller on mobile */
  .logo img {
    height: 40px;
    transition: all 0.3s ease;
  }
  
  /* Ensure the nav toggle is always visible and styled correctly */
  .nav-toggle {
    display: block !important;
    position: relative;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    margin-left: auto;
    padding: 0;
  }
  
  .nav-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--white);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
  }
  
  .header.scrolled .nav-toggle span {
    background: var(--dark);
  }
  
  .nav-toggle span:nth-child(1) {
    top: 0;
  }
  
  .nav-toggle span:nth-child(2) {
    top: 10px;
  }
  
  .nav-toggle span:nth-child(3) {
    top: 20px;
  }
  
  .nav-toggle.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
    background: var(--dark);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
  }
  
  .nav-toggle.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
    background: var(--dark);
  }
  
  /* Fix z-index issues with mobile menu */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 80px;
    transition: right 0.3s ease;
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  /* Fix overlay for mobile menu */
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none; /* Important fix */
  }
  
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Important fix */
  }
  
  /* Improved menu items spacing */
  .nav-menu li {
    margin: 0;
    width: 100%;
    border-bottom: 1px solid var(--gray-light);
  }
  
  .nav-menu a {
    color: var(--dark) !important;
    padding: 15px 20px;
    display: flex;
    width: 100%;
    font-size: 1rem;
    transition: all 0.2s ease;
  }
  
  .nav-menu a:hover,
  .nav-menu a.active {
    background-color: var(--gray-light);
    color: var(--primary) !important;
    padding-left: 25px; /* Slide right effect on hover */
  }
  
  /* Login button in mobile menu */
  .nav-menu .btn {
    margin: 20px;
    width: calc(100% - 40px);
    text-align: center;
  }
  
  /* Dashboard and Logout buttons spacing in mobile menu */
  .nav-menu .btn-outline-primary,
  .nav-menu .btn-outline-secondary {
    margin: 10px 20px;
    width: calc(100% - 40px);
    text-align: center;
  }
  
  /* First button (dashboard) gets more top margin */
  .nav-menu .btn-outline-primary {
    margin-top: 20px;
  }
  
  /* Welcome message mobile optimization */
  .welcome-message {
    padding: 0.7rem 1rem !important;
    margin-bottom: 1.5rem !important;
    text-align: center;
  }
  
  .welcome-text {
    font-size: 0.9rem !important;
    justify-content: center;
  }
  
  /* Fix no-scroll for body */
  body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
  
  /* Add better active state for menu items */
  .nav-menu a.active:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary);
  }
}

/* Make sure hamburger menu script is properly triggered */
@media (max-width: 992px) {
  /* Add custom JavaScript fix after DOM loads */
  body:after {
    content: "";
    display: none;
  }

  /* Add this class to body to activate custom script */
  body.mobile-fix-active:after {
    display: block;
  }
}

/* ===== HERO SECTION MOBILE FIXES ===== */
@media (max-width: 992px) {
  /* Account for fixed header */
  .hero {
    height: auto !important;
    min-height: 800px !important;
    text-align: center !important;
    padding-top: 80px !important; /* Add padding to account for fixed header */
    padding-bottom: 60px !important; /* Add bottom padding for clock image */
    /* Allow content to be visible */
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .hero .container {
    flex-direction: column !important;
    padding-top: 80px !important;
    /* Additional centering enforcement */
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }
  
  .hero-content {
    padding: 30px 0 !important;
    align-items: center !important;
    text-align: center !important;
    /* Additional overflow prevention */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .hero-content h1 {
    font-size: 2.5rem !important;
    text-align: center !important;
    /* Additional positioning fixes */
    position: relative !important;
    transform: none !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .hero-content h1:after {
    margin: 10px auto !important;
  }
    .hero-content p {
    margin-left: auto !important;
    margin-right: auto !important;
    /* Additional positioning fixes */
    position: relative !important;
    transform: none !important;
    width: 100% !important;
    max-width: 600px !important;
  }
  
  /* Center the buttons in the hero section */
  .btn-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    gap: 15px !important;
  }
  
  .btn-group .btn {
    width: auto !important;
    min-width: 200px !important;
    max-width: 280px !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
  
  .hero-logo {
    margin-top: 60px !important;
    /* Additional centering */
    width: 100% !important;
    text-align: center !important;
  }
  
  .hero-logo-img {
    width: 70% !important;
    margin: 0 auto !important;
    display: block !important;
  }    .hero-clock {
    position: relative !important;
    max-width: 85% !important;
    width: auto !important;
    height: auto !important;
    margin: 30px auto !important;
    display: block !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
    /* Additional overflow prevention */
    box-sizing: border-box !important;
    /* Ensure the image is not cut off */    object-fit: contain !important;
    max-height: 300px !important;
  }
  
  .scroll-down {
    position: relative !important;
    bottom: auto !important;
    margin-top: 40px !important;
    margin-bottom: 20px !important;
    position: static !important;
    transform: none !important;
    display: block !important;
    text-align: center !important;
    left: auto !important;
  }
}

/* Extra mobile adjustments for smaller devices */
@media (max-width: 480px) {
  .hero {
    min-height: 650px !important;
    padding-top: 60px !important;
    padding-bottom: 30px !important;
  }
  
  .hero-clock {
    max-width: 80% !important;
    max-height: 250px !important;
    margin: 25px auto !important;
  }
  
  .hero-content {
    padding: 20px 0 !important;
  }
  
  /* Further optimize buttons for smaller screens */
  .btn-group {
    gap: 12px !important;
  }
  
  .btn-group .btn {
    min-width: 180px !important;
    max-width: 240px !important;
    padding: 10px 15px !important;
    font-size: 0.95rem !important;
  }
  
  .scroll-down {
    position: relative !important;
    bottom: auto !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
    position: static !important;
    transform: none !important;
    display: block !important;
    text-align: center !important;
    left: auto !important;
  }
}

/* Extra mobile adjustments for very small devices */
@media (max-width: 360px) {
  .hero {
    min-height: 600px !important;
    padding-top: 50px !important;
    padding-bottom: 25px !important;
  }
  
  .hero-clock {
    max-width: 75% !important;
    max-height: 200px !important;
    margin: 20px auto !important;
  }
  
  /* Further optimize buttons for very small screens */
  .btn-group {
    gap: 10px !important;
  }
  
  .btn-group .btn {
    min-width: 160px !important;
    max-width: 220px !important;
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
  }
  
  .scroll-down {
    position: relative !important;
    bottom: auto !important;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
    position: static !important;
    transform: none !important;
    display: block !important;
    text-align: center !important;
    left: auto !important;
  }
}

/* ===== SERVICES SECTION MOBILE FIXES ===== */
@media (max-width: 768px) {
  .service-card {
    min-height: 0;
    padding-bottom: 80px;
    margin-bottom: 25px;
    position: relative;
  }
  
  .service-icon-img {
    width: 80px;
    height: 80px;
  }
  
  .service-card h3 {
    font-size: 1.3rem;
  }
  
  /* Fix button positioning in service cards */
  .service-card .btn {
    width: calc(100% - 40px); /* Account for padding */
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    margin: 0 auto;
  }
}

/* ===== ABOUT SECTION MOBILE FIXES ===== */
@media (max-width: 768px) {
  .about-video {
    height: 300px;
  }
  
  .about-info {
    padding: 20px 0;
    text-align: center;
  }
  
  .about-info h2:after {
    margin: 10px auto;
  }
  
  .about .btn-primary {
    margin: 0 auto;
    display: block;
  }
}

/* ===== GALLERY SECTION MOBILE FIXES ===== */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .gallery-item {
    margin-bottom: 15px;
  }
}

/* ===== TESTIMONIALS SECTION MOBILE FIXES ===== */
@media (max-width: 768px) {
  .testimonial-slide {
    padding: 20px 15px;
    height: auto;
    max-height: 350px;
  }
  
  .testimonial-nav button {
    width: 35px;
    height: 35px;
  }
  
  .testimonial-prev {
    left: 5px;
  }
  
  .testimonial-next {
    right: 5px;
  }
}

/* ===== PRICING SECTION MOBILE FIXES - IMPROVED ===== */
@media (max-width: 768px) {
  /* Transform price table into cards for mobile */
  .price-table {
    display: block;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
  }
  
  /* Hide table header on mobile */
  .price-table thead {
    display: none;
  }
  
  /* Transform table rows into cards */
  .price-table tbody tr {
    display: block;
    margin-bottom: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  .price-table tbody tr:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
  }
  
  /* Style table cells as card elements */
  .price-table tbody td {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-light);
    position: relative;
  }
  
  .price-table tbody td:last-child {
    border-bottom: none;
  }
  
  /* Add labels for each cell */
  .price-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary);
    padding-top: 15px !important;
  }
  
  .price-description {
    font-size: 0.9rem;
    color: var(--dark);
    line-height: 1.4;
  }
  
  .price-value {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--dark);
    text-align: right !important;
    padding-bottom: 15px !important;
    background-color: var(--gray-light);
  }
  
  /* Add visual indicators instead of text labels */
  .price-name:before {
    content: "✂️ ";
  }
  
  .price-value:before {
    content: "€";
    margin-right: 5px;
    font-weight: normal;
  }
  
  /* Add booking/action button */
  .price-table tbody tr {
    position: relative;
  }
  
  .price-action {
    display: block;
    padding: 10px 15px;
    text-align: center;
    background-color: var(--primary-light);
  }
  
  .price-action button {
    width: 100%;
    padding: 8px 0;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .price-action button:hover {
    background-color: var(--primary-dark);
  }
}

/* ===== CONTACT SECTION MOBILE FIXES ===== */
@media (max-width: 768px) {
  .contact-info {
    text-align: center;
  }
  
  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .contact-icon {
    margin: 0 0 10px 0;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .map-container {
    height: 300px;
  }
}

/* ===== FOOTER MOBILE FIXES ===== */
@media (max-width: 768px) {
  .footer {
    text-align: center;
  }
  
  .footer h4:after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-about {
    margin-bottom: 30px;
  }
  
  .footer-social {
    justify-content: center;
  }
}

/* ===== DASHBOARD MOBILE FIXES ===== */
@media (max-width: 992px) {  /* Dashboard sidebar adjustments */
  .dashboard-wrapper {
    flex-direction: column;
  }
    .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100vh;
    z-index: 1005; /* Increased z-index to be higher than hamburger menu */
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  
  .dashboard-sidebar.active {
    left: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  }
    /* Sidebar close button (X) */
  .sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--danger);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    z-index: 1006; /* Higher z-index than sidebar itself */
  }
  
  .sidebar-close:before,
  .sidebar-close:after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: var(--white);
  }
  
  .sidebar-close:before {
    transform: rotate(45deg);
  }
  
  .sidebar-close:after {
    transform: rotate(-45deg);
  }
  
  .sidebar-close:hover {
    background-color: var(--danger-dark);
    transform: scale(1.1);
  }
    /* Dashboard main content adjustments */
  .dashboard-main {
    margin-left: 0;
    width: 100%;
    padding: 15px;
  }
  
  /* Fix spacing between header and content */
  .dashboard-main .dashboard-content {
    margin-top: 15px;
  }
    /* Improved mobile header for dashboard */
  .dashboard-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
  }
  
  .dashboard-header > div:first-child {
    display: flex;
    align-items: center;
    flex: 1;
  }
  
  .dashboard-title {
    font-size: 1.5rem;
    margin: 0 0 0 10px;
    color: var(--gray-800);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Toggle sidebar button improvements */
  .toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px; /* Prevent shrinking */
    border-radius: 8px;
    background-color: var(--primary-light);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1001; /* Ensure it's above sidebar overlay */
    font-size: 1.2rem;
    position: relative; /* Position for the X transformation */
  }
  
  .toggle-sidebar:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
  }
  
  .toggle-sidebar:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 112, 162, 0.25);
  }
  
  /* Transform hamburger to X when sidebar is active */
  .toggle-sidebar span {
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
  }
  
  .toggle-sidebar span:nth-child(1) {
    top: 14px;
  }
  
  .toggle-sidebar span:nth-child(2) {
    top: 20px;
  }
  
  .toggle-sidebar span:nth-child(3) {
    top: 26px;
  }
  
  /* X transformation when sidebar is active */
  .sidebar-active .toggle-sidebar {
    background-color: var(--danger);
  }
  
  .sidebar-active .toggle-sidebar span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
  }
  
  .sidebar-active .toggle-sidebar span:nth-child(2) {
    opacity: 0;
  }
  
  .sidebar-active .toggle-sidebar span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
  }
    /* Sidebar overlay */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
  }
  
  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
    /* Keep toggle button in its original position */
  .toggle-sidebar {
    z-index: 999; /* Lower z-index than sidebar */
  }
  
  /* Improved dashboard layout for mobile */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .stat-card {
    margin-bottom: 15px;
  }
  
  .dashboard-content-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Make appointment cards more mobile-friendly */
  .appointment-card {
    padding-bottom: 100px;
  }
  
  .appointment-actions {
    flex-direction: column;
  }
  
  .appointment-actions .btn {
    width: 100%;
    margin-bottom: 8px;
  }
  
  /* Better tabs for mobile */
  .tabs-header {
    overflow-x: auto;
    padding-bottom: 5px;
  }
  
  .tab-item {
    padding: 10px 15px;
    white-space: nowrap;
  }
  
  /* Improved form layouts for mobile */
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .booking-form .form-control {
    font-size: 16px; /* Prevent zoom on input focus in iOS */
  }
  
  /* Improve working hours display on mobile */
  .working-hours-container {
    grid-template-columns: 1fr;
  }
  
  /* Better notification display for mobile */
  .notification-item {
    padding: 15px;
  }
  
  .notification-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .notification-time {
    margin-top: 5px;
  }
    /* Style for dashboard header close button */
  .dashboard-header-close {
    position: relative;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--gray-light);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    border: none;
  }
  
  .dashboard-header-close:hover {
    background-color: var(--primary-light);
    color: var(--white);
    transform: rotate(90deg);
  }
  
  .dashboard-header-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 112, 162, 0.15);
  }
  
  /* Back to top button removed */
}

/* Extra small devices */
@media (max-width: 576px) {
  html {
    font-size: 14px;
  }
    /* Hero section adjustments for small mobile */
  .hero {
    min-height: 750px !important;
    padding-top: 80px !important;
    padding-bottom: 50px !important;
  }
    .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .scroll-down {
    position: relative !important;
    bottom: auto !important;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
    position: static !important;
    transform: none !important;
    display: block !important;
    text-align: center !important;
    left: auto !important;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  /* Smaller buttons for XS screens */
  .btn {
    padding: 10px 15px;
    font-size: 0.85rem;
  }
  
  /* Improve tables for very small screens */
  .table-responsive {
    overflow-x: auto;
  }
  
  .dashboard-table th,
  .dashboard-table td {
    padding: 8px;
    font-size: 0.85rem;
  }
    /* Better forms for very small screens */
  .form-label {
    margin-bottom: 3px;
    font-size: 0.85rem;
  }
  
  .form-control {
    padding: 8px 10px;
  }
  
  /* Make notifications more compact */
  .notification-item {
    padding: 12px;
  }
  
  /* Fix dashboard header for very small devices */
  .dashboard-header {
    padding: 12px 10px;
  }
  
  .dashboard-title {
    font-size: 1.3rem;
  }
  
  .toggle-sidebar {
    width: 35px;
    height: 35px;
  }
  
  /* Adjust logo size in very small screens */
  .hero-logo-img {
    width: 80%;
  }
}

/* Fix for smaller iPhone screens */
@media (max-width: 375px) {
  .container {
    padding: 0 10px;
  }
    /* Hero section adjustments for very small mobile */
  .hero {
    min-height: 700px !important;
    padding-top: 70px !important;
    padding-bottom: 40px !important;
  }
    .hero-content h1 {
    font-size: 2rem;
  }
  
  .scroll-down {
    position: relative !important;
    bottom: auto !important;
    margin-top: 25px !important;
    margin-bottom: 10px !important;
    position: static !important;
    transform: none !important;
    display: block !important;
    text-align: center !important;
    left: auto !important;
  }
  
  .service-card {
    padding: 15px;
    padding-bottom: 75px;
  }
  
  .service-icon-img {
    width: 70px;
    height: 70px;
  }
    /* Further improve dashboard header for very small screens */
  .dashboard-header {
    padding: 10px 8px;
    flex-wrap: wrap;
  }
  
  .dashboard-title {
    font-size: 1.2rem;
    max-width: 180px;
  }
  
  .toggle-sidebar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin-right: 8px;
  }
  
  .toggle-sidebar span:nth-child(1) {
    top: 11px;
  }
  
  .toggle-sidebar span:nth-child(2) {
    top: 16px;
  }
  
  .toggle-sidebar span:nth-child(3) {
    top: 21px;
  }
  
  .sidebar-active .toggle-sidebar span:nth-child(1),
  .sidebar-active .toggle-sidebar span:nth-child(3) {
    top: 16px;
  }
  
  .dashboard-header-close {
    width: 32px;
    height: 32px;
  }
  
  .dashboard-actions {
    margin-top: 5px;
  }
  
  .sidebar-close {
    right: 10px;
    top: 10px;
  }
}

/* ===== DASHBOARD HEADER ACTION BUTTONS FIXES ===== */
@media (max-width: 768px) {
  /* Fix dashboard header action buttons for mobile */
  .dashboard-header .dashboard-actions {
    display: flex;
    align-items: center;
  }
  
  .dashboard-header .action-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-left: 8px;
    font-size: 1rem;
  }
  
  .dashboard-header .action-badge {
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    top: -5px;
    right: -5px;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===== TOGGLE SIDEBAR NO SCROLL FIX ===== */
@media (max-width: 992px) {
  /* Prevent body scrolling when sidebar is open */
  body.sidebar-active {
    overflow: hidden;
  }
}

/* ===== EXTRA SIDEBAR CLOSE BUTTON IMPROVEMENTS ===== */
@media (max-width: 992px) {
  /* Make X button more prominent */
  .sidebar-header {
    position: relative; /* Ensure proper positioning context */
  }
  
  .sidebar-close {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  /* For smaller screens */
  @media (max-width: 375px) {
    .sidebar-close {
      top: 10px;
      right: 10px;
    }
  }
}