/* ============================================================
   WorkVista Job Portal — Layout Styles
   Header, Footer, Sidebar, Dashboard Layout
   ============================================================ */

/* ---- Main Header ---- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
}

.main-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 72px;
    max-width: var(--container-wide);
    margin: 0 auto;
}

.main-header.transparent {
    background: transparent;
}

.main-header.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.main-header.solid {
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.header-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    font-weight: 800;
}

.header-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}

.header-logo .logo-text span {
    color: var(--teal);
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.header-nav a:hover,
.header-nav a.active {
    color: white;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--teal);
    transition: width var(--transition-base);
    border-radius: 1px;
}

.header-nav a:hover::after,
.header-nav a.active::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-base);
    cursor: pointer;
}

.header-btn-login {
    color: white;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-btn-login:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.header-btn-signup {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.header-btn-signup:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 191, 166, 0.3);
}

/* User Menu (logged in) */
.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.header-user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--teal);
}

.header-user .user-name {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.header-user .user-role {
    font-size: 0.7rem;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Notification Bell */
.header-notification {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.header-notification:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.header-notification .notif-count {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--red);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ---- Main Footer ---- */
.main-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.7);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 32px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 16px 0 24px;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--teal);
    color: white;
    transform: translateY(-2px);
}

.footer-column h5 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--teal);
    padding-left: 4px;
}

.footer-newsletter p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

.footer-newsletter-form {
    display: flex;
    gap: 8px;
}

.footer-newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 0.9rem;
}

.footer-newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.footer-newsletter-form input:focus {
    border-color: var(--teal);
    outline: none;
}

.footer-newsletter-form button {
    padding: 12px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.footer-newsletter-form button:hover {
    transform: translateY(-1px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 60px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-wide);
    margin-left: auto;
    margin-right: auto;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--teal);
}

/* ---- Dashboard Layout ---- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 72px;
}

/* Sidebar */
.dashboard-sidebar {
    width: 280px;
    background: var(--navy);
    position: fixed;
    top: 72px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: var(--z-sticky);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 0;
    transition: transform var(--transition-base);
}

.sidebar-profile {
    text-align: center;
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
}

.sidebar-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--teal);
    margin: 0 auto 12px;
}

.sidebar-name {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.sidebar-email {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.sidebar-nav {
    padding: 0 12px;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section-title {
    padding: 8px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.3);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.sidebar-link.active {
    background: rgba(0, 191, 166, 0.15);
    color: var(--teal);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-link .sidebar-badge {
    margin-left: auto;
    background: var(--red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
    min-height: calc(100vh - 72px);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
}

.dashboard-subtitle {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Page content (non-dashboard) */
.page-content {
    padding-top: 72px;
    min-height: 100vh;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-sidebar {
        display: none;
    }

    .dashboard-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .main-header .header-inner {
        padding: 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .dashboard-content {
        padding: 16px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* ---- Mobile Navigation Overlay ---- */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    z-index: var(--z-modal);
    display: none;
    padding: 80px 32px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    font-weight: 500;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: color var(--transition-fast);
}

.mobile-nav-links a:hover {
    color: var(--teal);
}

.mobile-nav-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Prevent body scrolling when mobile nav is open */
body.nav-open {
    overflow: hidden !important;
    touch-action: none;
}