/* ══════════════════════════════════════════════════════
   header.css — CareerZoneHub
   Extracted from includes/header.php inline <style>
══════════════════════════════════════════════════════ */

/* ── CSS Variables (global) ── */
:root {
    --primary:      #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light:#3b82f6;
    --secondary:    #10b981;
    --danger:       #ef4444;
    --warning:      #f59e0b;
    --dark:         #0f172a;
    --gray-dark:    #334155;
    --gray:         #64748b;
    --gray-light:   #94a3b8;
    --gray-soft:    #e2e8f0;
    --light:        #f8fafc;
    --white:        #ffffff;
    --radius:       8px;
    --radius-lg:    16px;
    --shadow-xl:    0 20px 25px -5px rgba(0,0,0,0.15);
}

/* ══════════════════════════════════════
   RESET / BASE
══════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════
   CONTAINER  ← THIS WAS THE PADDING:30 BUG
══════════════════════════════════════ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;   /* was 30px — fixed */
}

@media (min-width: 640px)  { .container { padding: 0 20px; } }
@media (min-width: 1024px) { .container { padding: 0 24px; } }
@media (min-width: 1280px) { .container { padding: 0 32px; } }

/* ══════════════════════════════════════
   LOADING OVERLAY
══════════════════════════════════════ */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   NOTIFICATION ALERT
══════════════════════════════════════ */
.notification-alert {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 380px;
    display: none;
}

.notification-alert.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ══════════════════════════════════════
   STICKY HEADER
══════════════════════════════════════ */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transform: translateY(0);
    transition: transform 0.3s ease-in-out, box-shadow 0.2s ease;
    height: 60px;
}

.main-header.hidden {
    transform: translateY(-100%);
}

.header-container {
    height: 60px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ══════════════════════════════════════
   LOGO
══════════════════════════════════════ */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo .logo-img {
    height: 42px;
    width: auto;
    display: block;
}

/* Hide legacy elements if referenced */
.site-logo .logo-text,
.site-logo .logo-icon { display: none; }

/* ══════════════════════════════════════
   LAST UPDATED
══════════════════════════════════════ */
.last-updated {
    font-size: 0.78rem;
    color: var(--gray);
    display: none;           /* hidden on mobile */
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.last-updated i { color: var(--primary); font-size: 0.8rem; }

@media (min-width: 768px) {
    .last-updated { display: flex; }
}

/* ══════════════════════════════════════
   MOBILE MENU BUTTON
══════════════════════════════════════ */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
    flex-shrink: 0;
    margin-left: auto;
    transition: background 0.2s;
}

.mobile-menu-btn:hover { background: var(--light); }

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animate to X when active */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
}

/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
.main-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.2s ease;
    padding: 0;
}

.main-nav.active {
    max-height: 100vh;
    padding: 8px 0 16px;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .main-nav {
        position: static;
        max-height: none;
        overflow: visible;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin-left: auto;
    }
}

/* Nav links list */
.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

@media (min-width: 768px) {
    .nav-links {
        flex-direction: row;
        align-items: center;
        gap: 2px;
    }
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-dark);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border-radius: 0;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .nav-links li a {
        padding: 7px 11px;
        border-radius: var(--radius);
        font-size: 0.85rem;
    }
}

.nav-links li a:hover,
.nav-links li a.active {
    background: var(--light);
    color: var(--primary);
}

.nav-links li a i {
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
    color: var(--primary);
    opacity: 0.8;
}

/* ══════════════════════════════════════
   MAIN CONTENT (push below fixed header)
══════════════════════════════════════ */
.main-content {
    margin-top: 0;
    padding-top: 60px;   /* = header height */
    min-height: calc(100vh - 60px);
}

/* ══════════════════════════════════════
   ADMIN INDICATOR
══════════════════════════════════════ */
.admin-indicator {
    background: linear-gradient(135deg, var(--danger) 0%, var(--warning) 100%);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: var(--radius);
    animation: pulse 2s infinite;
    margin: 10px auto;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.75; }
}

/* ══════════════════════════════════════
   ALERT / SESSION MESSAGES
══════════════════════════════════════ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 12px;
    border-left: 4px solid transparent;
}

.alert i { flex-shrink: 0; margin-top: 2px; }

.alert-success { background: #d1fae5; border-color: #10b981; color: #065f46; }
.alert-error   { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.alert-warning { background: #fff3cd; border-color: #f59e0b; color: #92400e; }
.alert-info    { background: #dbeafe; border-color: #3b82f6; color: #1e3a5f; }

.btn-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: inherit;
    opacity: 0.6;
    line-height: 1;
    flex-shrink: 0;
}

.btn-close:hover { opacity: 1; }

/* ══════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════ */
.breadcrumb {
    background: #f8f9fa;
    padding: 8px 14px;
    border-radius: var(--radius);
    margin: 12px 0;
    font-size: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb .separator {
    color: var(--gray-light);
    font-size: 0.9rem;
}

.breadcrumb span:last-child { color: var(--gray); }

/* ══════════════════════════════════════
   PRIVACY MODAL
══════════════════════════════════════ */
.privacy-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.privacy-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.privacy-modal .modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.privacy-modal .modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 20px;
    text-align: center;
}

.privacy-modal .modal-body {
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

.privacy-modal .modal-footer {
    padding: 16px 20px;
    background: var(--light);
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════
   COOKIE CONSENT
══════════════════════════════════════ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 9998;
    padding: 14px 16px;
    display: none;
}

.cookie-consent.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.cookie-header i { font-size: 1.8rem; color: var(--primary); }

.cookie-options {
    display: none;
    margin-top: 10px;
    font-size: 0.85rem;
}

.cookie-options label {
    display: block;
    margin: 5px 0;
    cursor: pointer;
}

/* ══════════════════════════════════════
   UTILITY / DISPLAY HELPERS
══════════════════════════════════════ */
.d-none   { display: none !important; }
.d-flex   { display: flex !important; }
.d-block  { display: block !important; }

@media (min-width: 768px) {
    .d-md-block { display: block !important; }
    .d-md-flex  { display: flex !important; }
    .d-md-none  { display: none !important; }
}

.justify-content-between { justify-content: space-between !important; }
.align-items-center      { align-items: center !important; }
.text-white              { color: #fff !important; }
.text-center             { text-align: center !important; }