/* Modern Customer Site Styles - Mobile First Design */
:root {
    --primary: #12b6c6;
    /* teal from logo */
    --primary-dark: #0d8dbb;
    /* deeper teal/blue */
    --primary-light: #6fd5e1;
    /* lighter teal */
    --secondary: #0f7bc4;
    /* navy/blue accent */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #1f9dd6;
    /* info aligned to logo blue */
    --dark: #1e293b;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile First - Base Styles (320px+) */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

.site-body {
    padding-top: 56px;
}

/* Navbar - Mobile First */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.navbar .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    max-width: 100%;
}

.navbar-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary) !important;
    padding: 0.5rem 0.75rem;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    border: none;
}

#themeToggle,
#notificationDropdown {
    color: var(--bs-body-color);
    transition: all 0.2s ease;
}

#themeToggle:hover,
#notificationDropdown:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    min-height: 44px;
    /* Touch target size */
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(18, 182, 198, 0.1);
    color: var(--primary);
}

.navbar-nav .nav-link.active {
    background-color: rgba(18, 182, 198, 0.15);
    color: var(--primary);
    font-weight: 600;
}

/* Dark Mode Navbar Adjustments */
[data-bs-theme="dark"] .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(2.5);
}

[data-bs-theme="dark"] .navbar-brand span {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .nav-link {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
    color: var(--primary) !important;
}

[data-bs-theme="dark"] .navbar-toggler {
    border: 1px solid var(--bs-border-color);
}

/* Dropdown Menu */
.dropdown-menu {
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
    min-width: 200px;
    z-index: 1050;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    min-height: 44px;
    /* Touch target */
    display: flex;
    align-items: center;
}

/* Fix dropdown in post actions */
.post-actions .dropdown {
    position: relative;
}

.post-actions .dropdown-menu {
    position: absolute;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    top: 100% !important;
    margin-top: 0.25rem;
}

.post-actions .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Ensure card doesn't clip dropdown */
.card {
    overflow: visible !important;
}

.card-body {
    overflow: visible !important;
}

.dropdown-item:hover {
    background-color: var(--bs-tertiary-bg);
}

/* Card Depth and Animations - Theme Aware */
.card.border-0.shadow-sm {
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .card.border-0.shadow-sm {
    background: var(--bs-secondary-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .card.border-0.shadow-sm::before {
    opacity: 0.4;
}

/* Form Elements - Theme Aware */
.form-control,
.form-select {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.input-group-text {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

/* Profile Photo Overlays */
.profile-photo-overlay-img {
    background-color: var(--bs-card-bg) !important;
    border-color: var(--bs-card-bg) !important;
}

[data-bs-theme="dark"] .profile-photo-overlay-img {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 0 4px var(--bs-body-bg);
}

/* Template Selection Components */
.template-selection-container {
    background: var(--bs-body-bg) !important;
}

[data-bs-theme="light"] .template-selection-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
}

.template-card {
    background: var(--bs-card-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .template-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.template-card.selected {
    border-color: var(--primary) !important;
}

.template-preview {
    background: var(--bs-secondary-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
}

.template-name {
    color: var(--bs-body-color) !important;
}

.template-description {
    color: var(--bs-secondary-color) !important;
}

.template-preview-content {
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .template-preview-content div,
[data-bs-theme="dark"] .template-preview-content h3,
[data-bs-theme="dark"] .template-preview-content h4,
[data-bs-theme="dark"] .template-preview-content p {
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

.dropdown-item i {
    width: 20px;
    font-size: 1.1rem;
}

/* Share dropdown specific styling */
.post-actions .dropdown-menu .dropdown-item {
    font-size: 0.95rem;
    white-space: nowrap;
}

.post-actions .dropdown-menu .dropdown-item i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.post-actions .dropdown-menu .dropdown-divider {
    margin: 0.5rem 0;
}

/* Social media icon colors */
.post-actions .bi-facebook {
    color: #1877f2 !important;
}

.post-actions .bi-twitter {
    color: #1da1f2 !important;
}

.post-actions .bi-whatsapp {
    color: #25d366 !important;
}

.post-actions .bi-linkedin {
    color: #0077b5 !important;
}

.post-actions .bi-link-45deg {
    color: #6c757d;
}

/* Offcanvas Menu - Mobile First */
.offcanvas {
    max-width: 280px;
    /* Narrower on mobile */
}

.offcanvas-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem;
}

.offcanvas-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.offcanvas-body {
    padding: 1rem;
}

.offcanvas-body .nav-link {
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    min-height: 44px;
    /* Touch target */
}

.offcanvas-body .nav-link.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.offcanvas-body .nav-link:hover {
    background-color: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

/* Site Wrapper - Mobile First */
.site-wrapper {
    min-height: calc(100vh - 56px);
    padding: 0;
}

.site-content {
    min-height: calc(100vh - 56px);
    background-color: var(--bs-body-bg);
    padding: 1rem 0.75rem;
}

/* Hero Section - Mobile First */
.hero-section {
    margin-bottom: 1.5rem;
}

.hero-section .bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.hero-section .card-body {
    padding: 1.5rem;
    background: transparent !important;
}

.hero-section h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.hero-section p {
    font-size: 0.9rem;
}

/* Search Card - Mobile First */
.search-card {
    margin-bottom: 1.5rem;
}

.search-card .card-body {
    padding: 1rem;
}

.search-form .form-control,
.search-form .form-select {
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    min-height: 44px;
    /* Touch target */
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    padding: 0.75rem 0.75rem;
    min-height: 44px;
}

.input-group .form-control.border-start-0 {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* Jobs Grid - Mobile First (1 column) */
.jobs-section {
    margin-bottom: 2rem;
    width: 100%;
    overflow-x: hidden;
}

.jobs-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.jobs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

.job-card-modern .card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.job-card-modern .card-body {
    padding: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.job-card-modern .card {
    max-width: 100%;
    overflow: hidden;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Disable hover on touch devices */
@media (hover: none) {
    .hover-lift:hover {
        transform: none;
    }
}

.company-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.job-card-modern .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.job-card-modern .card-title a {
    transition: color 0.2s ease;
}

.job-card-modern .card-title a:hover {
    color: var(--primary) !important;
}

/* Badges - Mobile First */
.badge {
    font-weight: 500;
    padding: 0.4em 0.7em;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.2;
}

.bg-primary.bg-opacity-10 {
    background-color: rgba(99, 102, 241, 0.1) !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* Buttons - Mobile First (Touch-friendly) */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    /* Touch target */
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    min-height: 38px;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    min-height: 52px;
}

/* Cards - Mobile First */
.card {
    border-radius: 12px;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-card-bg);
    color: var(--bs-card-color);
    transition: all 0.3s ease;
}

.card-body {
    padding: 1rem;
}

.card-header-custom {
    padding: 1rem;
    background-color: var(--bs-card-cap-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

/* Empty State - Mobile First */
.empty-state {
    margin: 2rem 0;
    text-align: center;
}

.empty-icon {
    opacity: 0.3;
    font-size: 3rem;
}

/* Forms - Mobile First */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    min-height: 44px;
    /* Touch target */
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    outline: none;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Job Details Specific - Mobile First */
.job-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.job-description-text {
    line-height: 1.8;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.info-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Utility Classes */


.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

/* Fix for iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
    .site-content {
        min-height: -webkit-fill-available;
    }

    body {
        min-height: -webkit-fill-available;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive Design - Mobile First Breakpoints */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    body {
        font-size: 14px;
    }

    .site-content {
        padding: 1.25rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .hero-section .card-body {
        padding: 2rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .search-card .card-body {
        padding: 1.5rem;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .job-card-modern .card-body {
        padding: 1.25rem;
    }

    .company-avatar {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    /* Fix container padding */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    body {
        font-size: 15px;
    }

    .site-content {
        padding: 2rem;
    }

    .navbar-brand {
        font-size: 1.15rem;
    }

    .offcanvas {
        max-width: 320px;
    }

    .hero-section {
        margin-bottom: 2rem;
    }

    .hero-section .card-body {
        padding: 2.5rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .search-card {
        margin-bottom: 2rem;
    }

    .search-card .card-body {
        padding: 2rem;
    }

    .jobs-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .jobs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .job-card-modern .card-body {
        padding: 1.5rem;
    }

    .company-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

    .job-card-modern .card-title {
        font-size: 1.2rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .card-header-custom {
        padding: 1.25rem 1.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .site-content {
        padding: 2.5rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        margin: 0 0.25rem;
        min-height: auto;
    }

    .jobs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }

    .job-card-modern .card-body {
        padding: 1.75rem;
    }

    .hero-section .card-body {
        padding: 3rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .site-content .container-fluid {
        max-width: 1320px;
        margin: 0 auto;
    }

    .jobs-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .job-card-modern .card-body {
        padding: 2rem;
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .site-content {
        padding: 3rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets for touch devices */
    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 48px;
        padding: 0.75rem 1rem;
    }

    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }

    /* Disable hover effects */
    .btn:hover:not(:disabled) {
        transform: none;
    }

    /* Better spacing for touch */
    .card-body {
        padding: 1.25rem;
    }

    /* Prevent text selection on buttons */
    .btn {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
        -webkit-touch-callout: none;
        user-select: none;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        margin-bottom: 1rem;
    }

    .hero-section .card-body {
        padding: 1.25rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .site-content {
        padding: 1rem 0.75rem;
    }

    .navbar {
        padding: 0.375rem 0;
    }
}

/* Mobile Specific Fixes (max-width: 767px) */
@media (max-width: 767px) {

    /* Fix container padding */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Job card padding on mobile */
    .job-card-modern .card-body.p-4 {
        padding: 1rem !important;
    }

    /* Better button spacing on mobile */
    .btn-group,
    .d-flex.gap-2 {
        gap: 0.5rem !important;
    }

    /* Profile completion card mobile */
    .profile-completion-card .card-body {
        padding: 1rem !important;
    }

    /* Hero section mobile */
    .hero-section .card-body.p-4,
    .hero-section .card-body.p-md-5 {
        padding: 1.25rem !important;
    }

    /* Search card mobile */
    .search-card .card-body.p-4 {
        padding: 1rem !important;
    }

    /* Fix flex-wrap on mobile */
    .d-flex.flex-wrap {
        gap: 0.5rem;
    }

    /* Better text sizing */
    .card-title {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    /* Company avatar mobile */
    .company-avatar {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    /* Badge spacing */
    .badge {
        font-size: 0.7rem;
        padding: 0.35em 0.6em;
    }
}

/* Very Small Devices (320px - 374px) */
@media (max-width: 374px) {
    body {
        font-size: 13px;
    }

    .site-content {
        padding: 0.75rem 0.5rem;
    }

    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .hero-section .card-body {
        padding: 1rem !important;
    }

    .hero-section h1 {
        font-size: 1.25rem;
    }

    .search-card .card-body {
        padding: 0.875rem !important;
    }

    .job-card-modern .card-body {
        padding: 0.875rem !important;
    }

    .card-body {
        padding: 0.875rem !important;
    }

    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }

    .navbar-brand {
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    .company-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* Prevent horizontal overflow globally */
* {
    max-width: 100%;
    box-sizing: border-box;
}

img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix for long words breaking layout */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
label,
input,
textarea,
select {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Input and form elements mobile fix */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for Bootstrap row overflow */
.row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.row>* {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (max-width: 575px) {
    .row {
        margin-left: -0.375rem;
        margin-right: -0.375rem;
    }

    .row>* {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }
}

/* Table responsiveness */
table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    table {
        font-size: 0.875rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* Job details page mobile */
    .job-description-text,
    .info-item {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* Social share buttons mobile */
    .social-share-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .social-share-buttons .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: calc(50% - 0.25rem);
    }

    /* Fix for col-lg-8 and col-lg-4 on mobile */
    [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Better spacing for cards on mobile */
    .card-body.p-4,
    .card-body.p-5 {
        padding: 1.25rem !important;
    }

    /* Fix for g-4 gap on mobile */
    .row.g-4>* {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    /* Profile tabs mobile scroll */
    .nav-tabs-custom {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
}

/* Fix for input groups on mobile */
@media (max-width: 575px) {
    .input-group {
        flex-wrap: wrap;
    }

    .input-group-text {
        width: 100%;
        border-radius: 8px 8px 0 0 !important;
        border-bottom: none !important;
    }

    .input-group .form-control {
        border-radius: 0 0 8px 8px !important;
        border-top: none !important;
    }

    .input-group .form-control.border-start-0 {
        border-left: 1px solid var(--gray-300) !important;
    }

    /* Form labels mobile */
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.375rem;
    }

    /* Better spacing for form rows */
    .row.g-3>*,
    .row.g-4>* {
        margin-bottom: 0.75rem;
    }

    /* Profile image upload mobile */
    .profile-image-preview {
        max-width: 100%;
        height: auto;
    }

    /* File input mobile */
    input[type="file"] {
        font-size: 14px;
        padding: 0.5rem;
    }
}

/* Additional Mobile Fixes */
@media (max-width: 767px) {

    /* Fix for offcanvas width */
    .offcanvas {
        max-width: 85vw;
    }

    /* Better dropdown on mobile */
    .dropdown-menu {
        max-width: calc(100vw - 2rem);
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    /* Modal mobile fix */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    /* Alert mobile */
    .alert {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }

    /* Badge mobile */
    .badge {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    /* Text truncation for long text */
    .text-truncate {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Fix for flex items wrapping */
    .d-flex {
        flex-wrap: wrap;
    }

    /* Better icon sizing on mobile */
    .bi {
        font-size: 1em;
    }

    /* Fix for small text */
    small,
    .small {
        font-size: 0.8rem;
    }
}

/* Profile Tabs */
.nav-tabs-custom {
    border-bottom: 2px solid var(--gray-200);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
}

.nav-tabs-custom .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-600);
    padding: 0.75rem 1rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-weight: 500;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nav-tabs-custom .nav-link:hover {
    border-bottom-color: var(--gray-300);
    color: var(--primary);
    background-color: var(--gray-50);
}

.nav-tabs-custom .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: transparent;
    font-weight: 600;
}

.nav-tabs-custom .nav-link i {
    font-size: 1.1rem;
}

/* Dynamic Form Items */
.education-item,
.experience-item,
.project-item {
    background-color: var(--bs-tertiary-bg);
    transition: all 0.2s ease;
}

.education-item:hover,
.experience-item:hover,
.project-item:hover {
    background-color: var(--bs-secondary-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Profile Completion Card */
.profile-completion-card {
    animation: slideDown 0.3s ease-out;
}

.profile-completion-card .profile-card-adaptive {
    background: var(--bs-primary-bg-subtle) !important;
    border: 1px solid var(--bs-primary-border-subtle) !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-completion-card .progress {
    background-color: var(--bs-secondary-bg);
}

.profile-completion-card .progress-bar {
    transition: width 0.6s ease;
}

.profile-step-item {
    transition: all 0.2s ease;
    min-height: 70px;
    display: flex;
    align-items: center;
    background-color: var(--bs-tertiary-bg);
}

.profile-step-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    background-color: var(--bs-secondary-bg) !important;
}

.step-icon {
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

/* Mobile Safe Area (for notched devices) */
@supports (padding: max(0px)) {
    .site-content {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    .navbar {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
}

/* Fix for fixed elements on mobile */
@media (max-width: 767px) {
    .navbar.fixed-top {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
    }

    /* Ensure content doesn't hide behind navbar */
    .site-body {
        padding-top: 56px;
    }

    /* Chatbot mobile positioning */
    .chatbot-container {
        bottom: max(10px, env(safe-area-inset-bottom));
        right: max(10px, env(safe-area-inset-right));
    }
}

/* Job Photos Gallery */
.job-photo-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job-photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1;
    position: relative;
}

#jobPhotosGallery {
    margin-top: 0.5rem;
}

/* Photo Modal */
#photoModal .modal-body img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Print Styles */
@media print {

    .navbar,
    .btn,
    .offcanvas,
    .nav-tabs,
    .chatbot-container,
    .job-photo-item {
        display: none !important;
    }

    .site-body {
        padding-top: 0;
    }

    .site-content {
        padding: 0;
    }
}

/* Social Media Feed Styles */
.social-card {
    border-radius: 8px !important;
    overflow: hidden;
    transition: all 0.2s ease !important;
    background-color: var(--bs-card-bg);
}

.social-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px);
}

.post-header {
    background: transparent;
}

.post-header h6 {
    font-size: 15px;
    font-weight: 600;
}

.post-content {
    background: transparent;
    font-size: 15px;
    color: var(--bs-body-color);
    line-height: 1.5;
}

.post-stats {
    background: transparent;
    font-size: 13px;
    color: var(--bs-secondary-color);
}

.post-actions {
    background: transparent;
}

.post-actions .btn-link {
    border-radius: 6px;
    padding: 8px 12px !important;
    transition: background-color 0.15s ease;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none !important;
    color: var(--bs-secondary-color);
}

.post-actions .btn-link:hover {
    background-color: var(--bs-secondary-bg) !important;
}

.post-actions .btn-link:active {
    background-color: var(--bs-tertiary-bg) !important;
}

.comments-section {
    background: transparent;
}

.comment-form .form-control {
    border-radius: 20px;
    background-color: var(--bs-secondary-bg);
    border: none;
    padding: 8px 16px;
    font-size: 14px;
}

.comment-form .form-control:focus {
    background-color: var(--bs-tertiary-bg);
    box-shadow: none;
}

.comment-item {
    background: var(--bs-secondary-bg) !important;
    border-radius: 18px !important;
    border: none !important;
}

.reply-item {
    background: var(--bs-tertiary-bg) !important;
    border-radius: 16px !important;
}

.company-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Quick Search Section */
.quick-search-section .form-control {
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
    padding: 10px 16px 10px 45px;
    font-size: 15px;
    transition: all 0.3s ease;
    min-height: 46px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 18px;
}

#toggleFilterBtn,
.filter-btn-mobile {
    border: 1px solid var(--bs-border-color);
}