/* /assets/css/responsive.css (Final Consolidated Version) */

/* =================================================================
   1. Mobile Navigation Panel
   - Styles for the off-canvas menu and its backdrop.
   ================================================================= */
.mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-nav-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-panel {
    position: fixed;
    top: 10%;
    right: -280px; /* Start off-screen (LTR) */
    width: 280px;
    height: 80%;
    background-color: var(--primary-blue); /* Use theme primary blue */
    z-index: 999;
    padding: 1rem 1.0rem; /* Adjusted padding */
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.mobile-nav-panel.is-active {
    right: 0; /* Slide into view */
}
body[dir="rtl"] .mobile-nav-panel { /* RTL adjustments */
    right: auto;
    left: -280px; /* Start off-screen (RTL) */
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.2);
}
body[dir="rtl"] .mobile-nav-panel.is-active {
    left: 0; /* Slide into view (RTL) */
}

.mobile-nav-panel ul {
    list-style: none;
    padding: 10;
    margin: 0;
}
.mobile-nav-panel li { /* Added margin for space between list items */
    margin-bottom: 0.5rem;
}
.mobile-nav-panel li:last-child {
    margin-bottom: 0;
}
.mobile-nav-panel li a {
    display: block;
    padding: 1rem;
    color: var(--light-text); /* Use theme light text */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}
.mobile-nav-panel li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.mobile-nav-actions {
    margin-top: auto; /* Push to the bottom */
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 0.75rem; /* Space between buttons */
}
/* Mobile Nav Button Styles */
.mobile-nav-actions .nav-button {
    text-decoration: none;
    font-weight: 600;
    padding: 12px 16px; /* A slightly larger padding for better touch targets */
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
    display: block;
    text-align: center;
}
/* Style for secondary action buttons (Login, Logout) */
.mobile-nav-actions .login-btn,
.mobile-nav-actions .logout-btn-public {
    background-color: var(--light-gray); /* Light, clean color */
    color: var(--primary-blue); /* Dark blue text */
    border: none;
}
/* Style for primary action buttons (Sign Up, Dashboard) */
.mobile-nav-actions .signup-btn,
.mobile-nav-actions .dashboard-btn {
    background-color: transparent;
    color: var(--light-text);
    border: 2px solid rgba(255, 255, 255, 0.8);
}
/* Hover Effects */
.mobile-nav-actions .login-btn:hover,
.mobile-nav-actions .logout-btn-public:hover {
    background-color: #ffffff; /* Brighten on hover */
    transform: scale(1.02);
}
.mobile-nav-actions .signup-btn:hover,
.mobile-nav-actions .dashboard-btn:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--primary-blue); /* On hover, text takes the panel's background color */
    transform: scale(1.02);
}


/* --- 2. Hamburger Menu Button --- */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}
.hamburger-menu span {
    width: 30px;
    height: 3px;
    background-color: var(--primary-blue); /* Use theme primary blue */
    border-radius: 5px;
    transition: all 0.3s linear;
}

/* --- 3. Media Queries for Mobile Layouts --- */
@media (max-width: 991px) { /* Breakpoint for most mobile/tablet devices */
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }
    /* Adjust header right controls for mobile */
    .header-right-controls {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    /* Main content wrapper padding adjustment */
    .content-wrapper {
        padding: 2rem 1rem;
    }

    /* Force no scroll on body when mobile nav is active */
    body.no-scroll {
        overflow: hidden;
    }

    /* Stack grid layouts on mobile */
    .about-intro-content,
    .contact-layout,
    .job-details-layout,
    .single-post-layout,
    .profile-page-layout,
    .form-row,
    .dashboard-widgets,
    .reports-grid .dashboard-widgets {
        grid-template-columns: 1fr;
    }

    /* Adjust specific elements for mobile stacking */
    .section-title-left { text-align: center; }
    body[dir="rtl"] .section-title-left { text-align: center; }
    .section-title-left::after { margin: 8px auto 0; }
    .profile-card-container { position: static; top: auto; align-self: auto; } /* Remove sticky on mobile */
    .job-card-header img,
    .company-info-widget .company-info-header img {
        flex-shrink: 0;
    }
    .job-card-header h4,
    .company-info-widget .company-info-header h4 {
        margin: 0;
        font-size: 1.1rem;
    }
    .job-card-header p,
    .company-info-widget .company-info-header p {
        font-size: 0.9rem;
    }
    /* Responsive adjustment for general tables */
    .listings-table { min-width: 100%; } /* Allow table to shrink/scroll */

    /* Chatbot specific media queries (from chatbot.css) */
    .chat-widget-window {
        width: 90vw;
        right: 5vw;
        left: auto;
        bottom: 85px;
        max-height: 70vh;
    }
    body[dir="rtl"] .chat-widget-window {
        right: auto;
        left: 5vw;
    }
    .chat-widget-container {
        bottom: 15px;
        right: 15px;
    }
    body[dir="rtl"] .chat-widget-container {
        right: auto;
        left: 15px;
    }
}