/* ============================================
   Mobile-First Responsive Overhaul
   SarkariChakri24 — Premium Mobile Experience
   ============================================ */

/* --- Large Tablets / Small Laptops (≤1024px) --- */
@media (max-width: 1024px) {
    .job-detail-grid { grid-template-columns: 1fr; }
    .job-detail-sidebar { order: -1; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .profile-grid { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; }
    .jobs-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    .hero h1 { font-size: 2.6rem; }
}

/* --- Tablets (≤992px) --- */
@media (max-width: 992px) {
    .search-box { flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--radius-lg); }
    .search-box select { min-width: auto; border-left: none; border-top: 1px solid #e0e7ff; border-radius: var(--radius); }
    .search-box .btn-search { justify-content: center; border-radius: var(--radius); }
    .search-box input { border-radius: var(--radius); }
    .hero h1 { font-size: 2.2rem; }
    .hero-search { max-width: 100%; }
    .section { padding: 50px 0; }
    .stats-bar { margin-top: -30px; }
    .notice-card .notice-header { flex-direction: column; gap: 8px; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
    .category-card { padding: 20px 18px; }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {

    /* === GLOBAL TYPOGRAPHY & SPACING === */
    html { font-size: 15px; }
    body { line-height: 1.65; -webkit-text-size-adjust: 100%; }
    .container { padding: 0 16px; }
    .section { padding: 32px 0; }
    .section-title { margin-bottom: 24px; }
    .section-title h2 { font-size: 1.25rem; letter-spacing: -0.2px; }
    .section-title p { font-size: 0.85rem; margin-top: 8px; line-height: 1.6; }
    .section-title .title-bn { font-size: 0.8rem; }
    .section-title .title-line { margin: 10px auto 0; width: 50px; }

    /* === TOP BAR === */
    .top-bar { display: none; }

    /* === NAVBAR — Compact & Touch-Friendly === */
    .navbar .container { height: 58px; }
    .navbar .logo .logo-img { height: 55px !important; }
    .mobile-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius); }
    .nav-links {
        display: none; position: absolute; top: 58px; left: 0; right: 0;
        background: var(--bg-card); flex-direction: column; padding: 12px 16px;
        box-shadow: 0 12px 40px rgba(0,0,0,0.12); border-top: 2px solid var(--primary);
        z-index: 1000; max-height: calc(100vh - 58px); overflow-y: auto;
    }
    .nav-links.open { display: flex; animation: fadeInDown 0.25s ease; }
    .nav-links a {
        padding: 13px 16px; font-size: 0.95rem; border-radius: var(--radius-sm);
        color: var(--text-primary); font-weight: 500; border-bottom: 1px solid var(--border-light);
    }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links a:hover, .nav-links a.active { background: var(--primary-50); color: var(--primary); }
    .nav-links a.active::after { display: none; }
    .nav-auth { display: flex !important; margin-left: auto; margin-right: 12px; gap: 6px; }
    .nav-auth .btn { padding: 6px 10px !important; font-size: 0.75rem !important; min-height: 30px !important; }
    .nav-user { margin-left: auto; margin-right: 12px; }
    
    /* === NOTIFICATION DROPDOWN — Responsive === */
    .notification-dropdown {
        position: fixed !important;
        top: 65px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        transform: none !important;
        max-height: 80vh !important;
        border-radius: var(--radius-lg) !important;
        box-shadow: 0 15px 50px rgba(0,0,0,0.25) !important;
    }
    .notification-list {
        max-height: 60vh !important;
    }
    .notification-item {
        padding: 14px 16px !important;
    }
    .notification-item .notification-title {
        font-size: 0.88rem !important;
    }
    .notification-item .notification-org {
        font-size: 0.78rem !important;
    }
    .notification-item .notification-time {
        font-size: 0.7rem !important;
    }

    /* === HERO SECTION — Immersive Mobile === */
    .hero { padding: 32px 0 36px; min-height: auto; }
    .hero h1 { font-size: 1.6rem; line-height: 1.28; margin-bottom: 10px; letter-spacing: -0.3px; }
    .hero .hero-subtitle { font-size: 0.88rem; margin-bottom: 8px; line-height: 1.6; max-width: 100%; }
    .hero .hero-subtitle-bn { font-size: 0.82rem; margin-bottom: 20px; line-height: 1.5; }
    .hero-badge { font-size: 0.74rem; padding: 6px 14px; margin-bottom: 16px; gap: 6px; }
    .hero::after { width: 280px; height: 280px; }
    .hero .hero-orb { width: 220px; height: 220px; }

    /* === HERO SEARCH — Full Width Mobile === */
    .hero-search { margin: 0 auto; max-width: 100%; }
    .search-box { padding: 8px; border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
    .search-box input { padding: 12px 14px; font-size: 0.9rem; border-radius: var(--radius); }
    .search-box select { padding: 11px 14px; font-size: 0.85rem; min-width: auto; border-radius: var(--radius); }
    .search-box .btn-search { padding: 12px 20px; font-size: 0.88rem; border-radius: var(--radius); }
    .hero-quick-tags { gap: 8px; margin-top: 14px; justify-content: center; }
    .hero-quick-tags a { padding: 5px 12px; font-size: 0.74rem; }

    /* === STATS BAR — 2x2 Grid === */
    .stats-bar { margin-top: -22px; }
    .stats-grid { grid-template-columns: 1fr 1fr; border-radius: var(--radius-lg); box-shadow: 0 12px 36px rgba(79,70,229,0.14); }
    .stat-item { padding: 14px 10px; }
    .stat-item:nth-child(2)::after { display: none; }
    .stat-icon-wrap { width: 38px; height: 38px; font-size: 1.05rem; margin-bottom: 8px; }
    .stat-number { font-size: 1.35rem; letter-spacing: -0.3px; }
    .stat-label { font-size: 0.7rem; margin-top: 3px; letter-spacing: 0.3px; }

    /* === CATEGORY HOME CARDS === */
    .cat-home-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-home-card { border-radius: var(--radius); padding-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
    .cat-home-icon-wrap { margin: 16px 0 10px; }
    .cat-home-icon { width: 52px; height: 52px; font-size: 1.25rem; }
    .cat-home-en { font-size: 0.8rem; line-height: 1.35; }
    .cat-home-bn { font-size: 0.72rem; }
    .cat-home-names { padding: 0 10px; gap: 3px; }
    .cat-home-footer { padding: 10px 12px 0; margin-top: 10px; }
    .cat-home-count-num { font-size: 1.15rem; }
    .cat-home-count-label { font-size: 0.6rem; }
    .cat-home-arrow { width: 28px; height: 28px; font-size: 0.7rem; opacity: 1; transform: none; }

    /* === CATEGORY LIST CARDS === */
    .category-grid { grid-template-columns: 1fr; gap: 10px; }
    .category-card { padding: 16px 14px; gap: 12px; border-radius: var(--radius); }
    .category-icon { width: 42px; height: 42px; font-size: 1rem; border-radius: var(--radius-sm); }
    .category-info h3 { font-size: 0.9rem; }
    .category-count { font-size: 0.72rem; padding: 3px 10px; }

    /* === JOB CARDS — Beautiful Mobile Cards === */
    .jobs-grid { grid-template-columns: 1fr; gap: 14px; }
    .job-card {
        padding: 18px 16px; border-radius: var(--radius);
        border: 1px solid rgba(99,102,241,0.08);
        box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    }
    .job-card h3 { font-size: 0.95rem; margin-bottom: 5px; line-height: 1.4; }
    .job-card .job-org { font-size: 0.82rem; margin-bottom: 10px; gap: 5px; }
    .job-card .job-org-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); }
    .job-card .job-org-icon img { width: 36px !important; height: 36px !important; }
    .job-card-header { margin-bottom: 10px; }
    .job-meta { gap: 6px; margin-bottom: 12px; }
    .job-meta span { font-size: 0.74rem; padding: 4px 9px; }
    .job-card-footer { padding-top: 12px; }
    .job-card-footer .deadline { font-size: 0.8rem; }
    .job-card .featured-badge { font-size: 0.64rem; padding: 3px 10px; }

    /* === JOB LIST ITEMS === */
    .job-list-item {
        padding: 14px; gap: 12px; border-radius: var(--radius);
        margin-bottom: 10px; flex-wrap: wrap;
    }
    .job-list-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); }
    .job-list-icon img { width: 36px !important; height: 36px !important; }
    .job-list-info { min-width: 0; }
    .job-list-info h4 { font-size: 0.9rem; line-height: 1.35; }
    .job-list-info .job-list-meta { font-size: 0.78rem; gap: 4px 10px; }
    .job-list-deadline { text-align: left; width: 100%; display: flex; align-items: center; gap: 10px;
        padding-top: 10px; border-top: 1px dashed rgba(99,102,241,0.1); margin-top: 2px; }
    .job-list-deadline .days-left { font-size: 0.88rem; }
    .job-list-deadline small { font-size: 0.74rem; }

    /* === JOB DETAIL PAGE — HERO === */
    .job-detail-hero { padding: 28px 0 32px; }
    .job-detail-hero::after { width: 280px; height: 280px; top: -60px; right: -60px; }
    .job-detail-hero .container::after { width: 200px; height: 200px; bottom: -80px; left: -50px; }
    .job-detail-hero h1, .job-detail-hero h2 { font-size: 1.18rem; line-height: 1.35; text-shadow: 0 1px 8px rgba(0,0,0,0.12); }
    .jd-title-bn { font-size: 0.85rem; margin-bottom: 6px; }
    .jd-hero-header { flex-direction: row; align-items: flex-start; gap: 14px; }
    .jd-hero-logo {
        width: 64px; height: 64px; padding: 6px; border-radius: var(--radius);
        box-shadow: 0 6px 24px rgba(0,0,0,0.2), 0 0 40px rgba(99,102,241,0.1);
        border-width: 1.5px;
    }
    .jd-hero-logo:hover { transform: scale(1.04); }
    .jd-breadcrumb { font-size: 0.76rem; margin-bottom: 14px; gap: 5px; flex-wrap: wrap; }
    .jd-breadcrumb .sep { font-size: 0.65rem; }
    .job-detail-hero .org-name {
        font-size: 0.86rem; flex-wrap: wrap; gap: 4px;
        align-items: flex-start; line-height: 1.5;
    }
    .job-detail-hero .org-name i {
        font-size: 0.78rem;
        line-height: 1.5;
        flex-shrink: 0;
        margin-top: 1px;
    }
    .job-detail-meta { gap: 6px; margin-top: 16px; }
    .job-detail-meta span {
        font-size: 0.72rem; padding: 5px 11px; gap: 5px;
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    }
    .job-detail-meta span i { font-size: 0.68rem; }
    .job-detail-content { padding: 24px 0 36px; }
    .job-detail-grid { gap: 18px; }
    .job-detail-main {
        padding: 20px 16px; border-radius: var(--radius);
        overflow: hidden; word-wrap: break-word; overflow-wrap: break-word;
    }

    /* === DYNAMIC CONTENT (CMS/Database HTML) in job-detail-main === */

    /* --- Section headings --- */
    .job-detail-main h2 { font-size: 1.02rem; margin-top: 24px; margin-bottom: 14px; padding-bottom: 10px; gap: 8px; }
    .job-detail-main h2 i { width: 28px; height: 28px; font-size: 0.85rem; }
    .job-detail-main h1 { font-size: 1.15rem; }
    .job-detail-main h3 { font-size: 0.95rem; }
    .job-detail-main h4 { font-size: 0.9rem; }
    .job-detail-main h5 { font-size: 0.85rem; }
    .job-detail-main h6 { font-size: 0.82rem; }

    /* --- Body text --- */
    .job-detail-main p, .job-detail-main ul, .job-detail-main div { font-size: 0.88rem; line-height: 1.75; margin-bottom: 14px; }
    .job-detail-main ol { padding-left: 20px; margin-bottom: 14px; }
    .job-detail-main ol li { font-size: 0.88rem; line-height: 1.7; margin-bottom: 6px; padding-left: 6px; }
    .job-detail-main ul li { padding-left: 18px; margin-bottom: 6px; font-size: 0.88rem; line-height: 1.7; }
    .job-detail-main ul li::before { top: 9px; width: 6px; height: 6px; }

    /* --- Tables — Proportional content width with wrapping --- */
    .job-detail-main table {
        display: block;
        width: max-content;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 18px;
        font-size: 0.82rem;
        line-height: 1.55;
        border-radius: var(--radius-sm);
        border-collapse: collapse;
    }
    .job-detail-main table th,
    .job-detail-main table td {
        padding: 10px 12px;
        font-size: 0.8rem;
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
    }
    .job-detail-main table th {
        font-size: 0.75rem;
        padding: 8px 12px;
        letter-spacing: 0.2px;
    }

    /* --- Images --- */
    .job-detail-main img {
        max-width: 100%;
        height: auto !important;
        border-radius: var(--radius-sm);
        margin: 12px 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    /* --- Links --- */
    .job-detail-main a {
        font-size: 0.88rem;
        word-break: break-all;
    }

    /* --- Blockquotes --- */
    .job-detail-main blockquote {
        padding: 12px 14px;
        margin: 14px 0;
        font-size: 0.85rem;
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    }

    /* --- Pre/Code blocks --- */
    .job-detail-main pre {
        padding: 12px;
        font-size: 0.8rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .job-detail-main code { font-size: 0.82rem; }

    /* --- Horizontal rules --- */
    .job-detail-main hr { margin: 18px 0; }

    /* --- Inline styles override (tame CMS font-size) --- */
    .job-detail-main [style*="font-size"] {
        font-size: inherit !important;
    }

    /* --- Prevent wide inline-styled elements from breaking layout --- */
    .job-detail-main [style*="width"],
    .job-detail-main [style*="min-width"] {
        width: auto !important;
        min-width: unset !important;
        max-width: 100% !important;
    }

    /* --- iframes (YouTube, embedded content) --- */
    .job-detail-main iframe {
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: var(--radius-sm);
    }

    /* --- Global overflow safety --- */
    .job-detail-main * {
        max-width: 100%;
        box-sizing: border-box;
    }

    .job-detail-content table, .job-detail-content img { max-width: 100%; }
    .job-detail-content .container > div:first-child img { max-height: 200px !important; }

    /* === SIDEBAR === */
    .job-detail-sidebar .card { padding: 18px 16px; margin-bottom: 14px; border-radius: var(--radius); }
    .job-detail-sidebar .card h3 { font-size: 0.92rem; margin-bottom: 12px; }
    .job-info-table td { padding: 9px 0; font-size: 0.84rem; }
    .jd-share-grid a { width: 38px; height: 38px; font-size: 0.85rem; }
    .jd-related { margin-top: 32px; }
    .jd-related h2 { font-size: 1.15rem; margin-bottom: 18px; }
    .circular-viewer iframe { height: 420px !important; }

    /* === PAGE HERO (Inner pages) === */
    .page-hero { padding: 26px 0; }
    .page-hero h1 { font-size: 1.2rem; gap: 8px; flex-wrap: wrap; }
    .page-hero h1 i { font-size: 1rem; }
    .page-hero p { font-size: 0.84rem; line-height: 1.55; }

    /* === NOTICE CARDS === */
    .notice-card { padding: 18px 16px; margin-bottom: 12px; border-radius: var(--radius); }
    .notice-card h3 { font-size: 0.95rem; line-height: 1.45; }
    .notice-card p { font-size: 0.88rem; line-height: 1.65; }
    .notice-card .notice-meta { gap: 8px; font-size: 0.78rem; margin-top: 10px; padding-top: 10px; }

    /* === NOTICE TICKER === */
    .notice-ticker { font-size: 0.8rem !important; }

    /* === AUTH PAGES === */
    .auth-page { padding: 32px 16px; }
    .auth-card { padding: 28px 20px; border-radius: var(--radius-lg); }
    .auth-card h1 { font-size: 1.35rem; }
    .auth-card .auth-subtitle { font-size: 0.85rem; margin-bottom: 22px; }
    .role-selector { grid-template-columns: 1fr; gap: 10px; }
    .role-option { padding: 16px 14px; }
    .role-option i { font-size: 1.5rem; }

    /* === CTA SECTION === */
    .cta-section { padding: 44px 0; }
    .cta-icon-wrap { width: 56px; height: 56px; font-size: 1.5rem; margin-bottom: 16px; }
    .cta-title { font-size: 1.35rem; margin-bottom: 10px; line-height: 1.35; }
    .cta-subtitle { font-size: 0.9rem; margin-bottom: 22px; line-height: 1.55; }

    /* === BUTTONS — Touch Friendly === */
    .btn { min-height: 44px; font-size: 0.88rem; padding: 10px 20px; border-radius: var(--radius); }
    .btn-sm { min-height: 38px; padding: 8px 14px; font-size: 0.82rem; }
    .btn-lg { padding: 13px 26px; font-size: 0.95rem; }

    /* === PAGINATION === */
    .pagination { flex-wrap: wrap; gap: 4px; justify-content: center; }
    .page-link { width: 38px; height: 38px; font-size: 0.84rem; border-radius: var(--radius-sm); }
    .pagination-nav { margin-top: 28px; }

    /* === FORMS === */
    .form-row { grid-template-columns: 1fr; }
    .form-group { margin-bottom: 16px; }
    .form-control { padding: 11px 14px; font-size: 0.9rem; }

    /* === FOOTER === */
    .footer { padding: 32px 0 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
    .footer-brand { grid-column: 1 / -1; }
    /* .footer-brand .logo-img { height: 50px !important; } */
    .footer-brand p { font-size: 0.82rem; line-height: 1.65; }
    .footer h4 { font-size: 0.9rem; margin-bottom: 14px; padding-bottom: 10px; }
    .footer-links a { padding: 5px 0; font-size: 0.8rem; }
    .footer-bottom { padding: 16px 0; font-size: 0.76rem; }

    /* === PROFILE — FULL MOBILE OVERHAUL === */
    .profile-page { padding: 12px 0; }
    .profile-grid { gap: 12px; }

    /* Sidebar — compact horizontal strip on mobile */
    .profile-sidebar {
        position: static;
        top: auto;
    }
    .profile-sidebar .card {
        padding: 14px 12px !important;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
        flex-wrap: wrap;
    }
    .profile-sidebar .card > h3,
    .profile-sidebar .card > p {
        display: none; /* hide name/email to save space */
    }
    .profile-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        margin: 0;
        flex-shrink: 0;
    }
    .profile-nav {
        margin: 0;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        flex: 1;
    }
    .profile-nav a {
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: var(--radius-sm);
        gap: 5px;
    }
    .profile-nav a span { display: none; } /* hide text labels — icons only on 320px */
    .profile-nav a i { font-size: 0.9rem; }
    .profile-sidebar .card > hr { display: none; }
    .profile-sidebar .card > a.btn {
        width: auto !important;
        padding: 6px 12px !important;
        font-size: 0.75rem;
    }

    /* Step Progress — compact horizontal scroll */
    .step-progress {
        padding: 10px 8px;
        margin-bottom: 16px;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        border-radius: var(--radius);
        scrollbar-width: none; /* hide scrollbar */
    }
    .step-progress::-webkit-scrollbar { display: none; }
    .step-item { flex-shrink: 0; gap: 4px; }
    .step-item span { font-size: 0.65rem; white-space: nowrap; letter-spacing: 0; }
    .step-circle { width: 32px; height: 32px; font-size: 0.78rem; }
    .step-line { min-width: 20px; margin: 0 3px; margin-bottom: 16px; }

    /* Page heading */
    .profile-page h1 { font-size: 1.15rem !important; margin-bottom: 14px !important; }

    /* Form fieldset */
    .form-fieldset { padding: 12px 10px !important; }
    .form-fieldset legend { font-size: 0.8rem !important; }

    /* Form actions */
    .form-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .form-actions .btn { width: 100%; justify-content: center; }

    /* Disable card hover lift on touch devices */
    .card:hover { transform: none !important; }
    .profile-sidebar .card:hover { transform: none !important; }

    /* Education tabs — compact horizontal scroll */
    .edu-tabs {
        gap: 3px;
        margin-bottom: 14px;
        padding-bottom: 2px;
        scrollbar-width: none;
    }
    .edu-tabs::-webkit-scrollbar { display: none; }
    .edu-tab {
        padding: 8px 12px;
        font-size: 0.78rem;
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    }

    /* === TABLES === */
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* === MODAL === */
    .modal { width: 94%; padding: 24px 18px; max-height: 90vh; border-radius: var(--radius-lg); }

    /* === SCROLL TO TOP === */
    .scroll-top { bottom: 32px; right: 10px; width: 40px; height: 40px; font-size: 1rem; }

    /* === OVERFLOW PREVENTION === */
    .hero-stat-pill { font-size: 0.8rem; padding: 7px 14px; }

    /* === ALERTS === */
    .alert { padding: 12px 16px; font-size: 0.85rem; gap: 10px; }

    /* === TOAST === */
    .toast-container { top: 12px; right: 12px; left: 12px; }
    .toast { min-width: auto; width: 100%; padding: 12px 16px; font-size: 0.85rem; }

    /* === BADGES === */
    .badge { font-size: 0.7rem; padding: 3px 8px; }

    /* === RESUME PREVIEW (Mobile) === */
    .resume-preview-topbar { padding: 10px 0 !important; }
    .resume-preview-topbar .container > div {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }
    .resume-preview-topbar h1 { font-size: 1.1rem !important; }
    .resume-preview-topbar p { font-size: 0.78rem; }
    .btn-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .btn-actions a {
        justify-content: center !important;
        font-size: 0.82rem !important;
        padding: 9px 8px !important;
    }
    .resume-paper-wrapper { margin: 0 !important; border-radius: 0 !important; }
    .resume-paper-content {
        padding: 16px !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Small Mobile (≤480px) --- */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .hero { padding: 26px 0 28px; }
    .hero h1 { font-size: 1.35rem; line-height: 1.25; }
    .hero .hero-subtitle { font-size: 0.84rem; }
    .hero .hero-subtitle-bn { font-size: 0.78rem; margin-bottom: 16px; }
    .hero-badge { font-size: 0.7rem; padding: 5px 12px; margin-bottom: 12px; }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item { padding: 12px 8px; }
    .stat-icon-wrap { width: 34px; height: 34px; font-size: 0.95rem; margin-bottom: 6px; }
    .stat-number { font-size: 1.18rem; }
    .stat-label { font-size: 0.64rem; }

    .section { padding: 26px 0; }
    .section-title { margin-bottom: 18px; }
    .section-title h2 { font-size: 1.12rem; }
    .section-title p { font-size: 0.8rem; }

    .cat-home-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cat-home-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .cat-home-icon-wrap { margin: 12px 0 8px; }
    .cat-home-en { font-size: 0.74rem; }
    .cat-home-bn { font-size: 0.66rem; }
    .cat-home-footer { padding: 8px 10px 0; margin-top: 8px; }
    .cat-home-count-num { font-size: 1rem; }
    .cat-home-card { padding-bottom: 12px; }

    .job-card { padding: 16px 14px; }
    .job-card h3 { font-size: 0.9rem; }
    .job-card .job-org { font-size: 0.78rem; }
    .job-meta span { font-size: 0.72rem; padding: 3px 8px; }

    .job-list-item { padding: 12px; gap: 10px; }
    .job-list-icon { width: 38px; height: 38px; }
    .job-list-info h4 { font-size: 0.87rem; }
    .job-list-info .job-list-meta { font-size: 0.74rem; gap: 4px 8px; }
    .job-card-footer { flex-direction: row; gap: 8px; align-items: center; }

    .auth-card { padding: 24px 16px; }
    .auth-card h1 { font-size: 1.22rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 18px; }
    .footer-brand { grid-column: auto; }
    .footer-bottom p { font-size: 0.72rem; line-height: 1.55; }
    .footer h4 { font-size: 0.85rem; }

    .notice-card { padding: 14px 12px; }
    .notice-card h3 { font-size: 0.9rem; }
    .notice-card .notice-meta { flex-direction: column; gap: 4px; }

    .navbar .logo .logo-img { height: 50px !important; }
    .logo-text .logo-name { font-size: 1rem; }
    .logo-text .logo-tagline { font-size: 0.58rem; }

    .cta-section { padding: 32px 0; }
    .cta-title { font-size: 1.18rem; line-height: 1.35; }
    .cta-subtitle { font-size: 0.84rem; margin-bottom: 18px; }
    .cta-icon-wrap { width: 48px; height: 48px; font-size: 1.3rem; margin-bottom: 12px; }

    .job-detail-hero h1, .job-detail-hero h2 { font-size: 1.05rem; line-height: 1.3; }
    .jd-hero-logo { width: 54px; height: 54px; padding: 5px; border-width: 1px; }
    .jd-hero-header { gap: 12px; }
    .job-detail-hero .org-name { font-size: 0.82rem; gap: 3px; }
    .job-detail-hero .org-name i { font-size: 0.72rem; margin-top: 2px; }
    .job-detail-meta span { font-size: 0.68rem; padding: 4px 9px; }
    .job-detail-hero { padding: 22px 0 26px; }
    .job-detail-main { padding: 16px 14px; }
    .job-detail-sidebar .card { padding: 16px 14px; }
    .page-hero h1 { font-size: 1.08rem; }
    .page-hero p { font-size: 0.8rem; }
    .page-hero { padding: 20px 0; }

    .btn-lg { padding: 11px 20px; font-size: 0.88rem; }
}

/* --- Small Mobile (≤400px) --- */
@media (max-width: 400px) {
    .job-detail-hero .org-name {
        display: inline;
        font-size: 0.8rem;
        line-height: 1.6;
    }
    .job-detail-hero .org-name i {
        display: inline;
        margin: 0 3px 0 0;
        font-size: 0.7rem;
        vertical-align: middle;
        position: static;
    }
    .job-detail-hero .org-name .jd-title-bn {
        display: inline;
        margin-left: 4px;
    }
}

/* --- Very Small (≤360px) --- */
@media (max-width: 360px) {
    .container { padding: 0 10px; }
    .hero h1 { font-size: 1.18rem; }
    .hero { padding: 20px 0 24px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item::after { display: none !important; }
    .logo-text .logo-tagline { display: none; }
    .btn-lg { padding: 10px 18px; font-size: 0.85rem; }
    .navbar .container { height: 52px; }
    .navbar .logo .logo-img { height: 45px !important; }
    .section { padding: 20px 0; }
    .cat-home-grid { gap: 8px; }
    .cat-home-icon { width: 38px; height: 38px; font-size: 1rem; }
    .job-detail-hero h1, .job-detail-hero h2 { font-size: 0.95rem; }
    .jd-hero-logo { width: 46px; height: 46px; padding: 4px; }
    .job-detail-hero::after { display: none; }
    .job-detail-hero .container::after { display: none; }

    /* ===== PROFILE 320px EXTREME COMPACT ===== */
    .profile-page { padding: 8px 0; }
    .profile-grid { gap: 8px; }

    /* Sidebar: icon-only strip */
    .profile-sidebar .card {
        padding: 8px !important;
        gap: 6px;
    }
    .profile-avatar { width: 38px !important; height: 38px !important; font-size: 0.9rem !important; }
    .profile-nav { gap: 2px; }
    .profile-nav a { padding: 4px 7px !important; font-size: 0.7rem !important; }
    .profile-nav a i { font-size: 0.82rem; }
    .profile-sidebar .card > a.btn {
        padding: 4px 8px !important;
        font-size: 0.68rem !important;
    }

    /* Step progress: ultra compact */
    .step-progress { padding: 6px 4px !important; gap: 2px !important; }
    .step-item span { font-size: 0.58rem !important; }
    .step-circle { width: 24px !important; height: 24px !important; font-size: 0.68rem !important; }
    .step-line { min-width: 12px !important; }

    /* Card & form */
    .card { padding: 10px !important; border-radius: var(--radius) !important; }
    .form-fieldset { padding: 8px !important; margin-bottom: 10px !important; }
    .form-fieldset legend { font-size: 0.75rem !important; padding: 0 6px !important; }
    .form-group { margin-bottom: 10px !important; }
    .form-group label { font-size: 0.78rem !important; }
    .form-control { padding: 9px 10px !important; font-size: 0.82rem !important; }
    .profile-page h1 { font-size: 1rem !important; margin-bottom: 10px !important; }
    .btn-lg { padding: 10px 14px !important; font-size: 0.82rem !important; }

    /* Resume preview topbar 320px */
    .resume-preview-topbar h1 { font-size: 0.95rem !important; }
    .resume-preview-topbar p { display: none !important; }
    .btn-actions a { font-size: 0.68rem !important; padding: 6px 5px !important; }
    .resume-paper-content { padding: 8px !important; }

    /* Education tabs 320px */
    .edu-tab { padding: 6px 9px !important; font-size: 0.72rem !important; }
    .edu-tabs { gap: 2px !important; }
}

/* === MOBILE COLOR ENHANCEMENTS === */
@media (max-width: 768px) {
    /* Richer card gradients for mobile */
    .job-card { background: linear-gradient(150deg, #ffffff 0%, #f5f6ff 50%, #edf0ff 100%); }
    .job-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(79,70,229,0.13); background: linear-gradient(150deg, #fff 0%, #eff1ff 40%, #e7ebff 100%); }
    .notice-card { background: linear-gradient(145deg, #ffffff 0%, #f7f8ff 50%, #eef1ff 100%); }
    .cat-home-card { background: linear-gradient(160deg, #ffffff 0%, #f5f7ff 45%, #ecf0ff 100%); }
    .cat-home-card:hover { background: linear-gradient(160deg, #fff 0%, #eef1ff 40%, #e5eaff 100%); }
    .category-card { background: linear-gradient(145deg, #fff 0%, #f5f7ff 50%, #edf0ff 100%); }

    /* Enhanced stats bar on mobile */
    .stats-grid { background: linear-gradient(145deg, #ffffff, #f3f5ff); }
    .stat-item:hover { background: linear-gradient(135deg, #eef2ff, #dfe5ff); }

    /* Better hero search contrast */
    .search-box { background: rgba(255,255,255,0.98); box-shadow: 0 8px 32px rgba(0,0,0,0.2); }

    /* Improved job list items */
    .job-list-item { background: linear-gradient(145deg, #fff 0%, #f6f7ff 50%, #eef1ff 100%); }
    .job-list-item:hover { transform: translateX(3px); background: linear-gradient(145deg, #fff 0%, #f0f2ff 40%, #e8ecff 100%); }

    /* Enhanced footer mobile look */
    .footer { background: linear-gradient(170deg, #1e1b4b 0%, #0d0c24 100%); }

    /* Job detail cards with warmer feel */
    .job-detail-sidebar .card { background: linear-gradient(150deg, #fff 0%, #f5f7ff 50%, #edf0ff 100%); }
    .job-detail-main { background: linear-gradient(150deg, #fff 0%, #f8f9ff 50%, #f0f3ff 100%); }

    /* Better CTA mobile colors */
    .cta-section { background: linear-gradient(140deg, #1e1b4b 0%, #4338ca 45%, #6d28d9 100%); }

    /* Auth card */
    .auth-card { background: linear-gradient(150deg, rgba(255,255,255,0.97) 0%, rgba(245,247,255,0.97) 100%); }

    /* Category section bg */
    .cat-section { background: linear-gradient(165deg, #edf0ff 0%, #fff 40%, #edf0ff 100%); }

    /* Org cards on mobile */
    .org-card { background: linear-gradient(155deg, #fff 0%, #f5f7ff 50%, #ecf0ff 100%); }
    .org-card:hover { background: linear-gradient(155deg, #fff 0%, #eff1ff 40%, #e5eaff 100%); }
}
