/* ==========================================================================
   JOB WIZARD PORTAL - MASTER STYLESHEET
   ========================================================================== */

/* 1. GENERAL RESET & TYPOGRAPHY */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #e5e5e5; 
    color: #1d1d1f; 
}

:root {
    --theme-primary: #47838B; /* Default Theme Color */
}

/* ==========================================================================
   2. MASTER NAVIGATION RIBBON
   ========================================================================== */
.navbar {
    background-color: var(--theme-primary); 
    border-bottom: 3px solid #c5a059; 
    position: sticky; 
    top: 0;
    z-index: 100;
    padding: 6px 30px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    text-decoration: none;
}

.nav-brand img {
    background-color: #ffffff;
    border-radius: 50%;
    padding: 4px;
    height: 50px !important; 
    width: 50px !important;  
    object-fit: contain;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
}

.nav-links {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; 
    margin: 0;
}

.nav-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    gap: 15px;
    flex-wrap: nowrap; 
}

.nav-links > li {
    position: relative; 
    margin: 0 8px; 
}

.nav-links > li > a {
    display: inline-block;
    color: #ffffff;
    background-color: transparent;
    text-align: center;
    padding: 8px 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 40px; 
    border: 2px solid #ffffff; 
    transition: all 0.3s ease;
    white-space: nowrap; 
}

.nav-links > li > a:hover, .nav-links > li:hover > a.dropbtn {
    background-color: #ffffff;
    color: var(--theme-primary); 
}

.nav-search {
    position: relative; 
    flex: 1; 
    max-width: 250px; 
    display: flex;
    justify-content: flex-end;
}

.nav-search input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 6px; 
    border: 1px solid #ffffff;
    outline: none;
    font-size: 14px;
    background-color: #ffffff;
    color: #1d1d1f;
    transition: box-shadow 0.3s ease;
}

.nav-search input:focus {
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.5); 
}

/* ==========================================================================
   3. DROPDOWN MENUS
   ========================================================================== */
.dropdown-content {
    opacity: 0;
    visibility: hidden; 
    position: absolute;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0px 15px 35px rgba(0,0,0,0.2);
    border-radius: 12px;
    top: calc(100% + 15px); 
    left: 50%;
    transform: translateX(-50%) translateY(-10px); 
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 10px 0;
    border: 1px solid #e0e0e0;
}

.dropdown-content > a {
    color: #1d1d1f; 
    padding: 14px 24px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.dropdown-content > a:hover {
    background-color: #f0f4f8; 
}

.dropdown:hover > .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* --- NESTED SUB-DROPDOWN LOGIC --- */
.sub-dropdown {
    position: relative;
    display: block;
    width: 100%;
}

.sub-dropdown-content {
    display: none; 
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 15px 35px rgba(0,0,0,0.2);
    border-radius: 12px;
    top: -10px; 
    left: 100%; 
    margin-left: 8px; 
    z-index: 10;
    padding: 10px 0;
    border: 1px solid #e0e0e0;
}

.sub-dropdown-content > a {
    color: #1d1d1f;
    padding: 14px 24px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.sub-dropdown-content > a:hover {
    background-color: #f0f4f8;
}

.sub-dropdown:hover > .sub-dropdown-content {
    display: block;
}

.sub-dropbtn {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    white-space: nowrap !important;
    color: #1d1d1f;
    padding: 14px 24px;
    text-decoration: none;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sub-dropbtn:hover {
    background-color: #f0f4f8;
}

.sub-dropbtn span {
    margin-left: 15px;
    font-size: 16px;
    color: #888888;
}
/* ==========================================================================
   4. LAYOUT CONTAINERS
   ========================================================================== */
.content {
    padding: 80px 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Renamed from calc-container */
.wizard-container {
    max-width: 950px;
    margin: 40px auto;
    padding: 50px 60px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 10px 40px rgba(0,0,0,0.08);
}

/* ==========================================================================
   5. UNIFIED TYPOGRAPHY
   ========================================================================== */
h1 {
    font-size: 40px;
    font-weight: 600;
    color: #1d1d1f; 
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.wizard-container h1 {
    text-align: center; 
}

h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f; 
    margin-bottom: 24px;
}

p, li {
    font-size: 17px; 
    margin-bottom: 24px;
    line-height: 1.8; 
    color: #333333;
}

.content p {
    text-align: center;
    color: #86868b;
}

strong {
    color: #000000;
    font-weight: 600;
}

/* ==========================================================================
   6. WIZARD INTERFACE STYLING (Refactored)
   ========================================================================== */
.wizard-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    border-bottom: 2px solid #e5e5ea;
    padding-bottom: 20px;
}

.wizard-tab-btn {
    background-color: #f0f4f8;
    color: var(--theme-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-tab-btn:hover {
    background-color: #d2d2d7;
}

.wizard-tab-btn.active {
    background-color: var(--theme-primary);
    color: #ffffff;
}

.wizard-section {
    display: none; 
    animation: fadeIn 0.3s ease-in-out;
}

.wizard-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.wizard-input {
    padding: 12px 16px;
    font-size: 15px;
    border: 1.5px solid #d2d2d7;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #1d1d1f;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.wizard-input:focus {
    border-color: var(--theme-primary, #47838b);
    box-shadow: 0 0 0 3px rgba(71, 131, 139, 0.15);
}

.wizard-input:disabled {
    background-color: #f5f5f7 !important;
    color: #86868b !important;
    cursor: not-allowed !important;
}

/* ==========================================================================
   7. UI COMPONENTS
   ========================================================================== */
.pill-container {
    text-align: center;
    margin: 15px auto 35px auto;
}

.reference-pill {
    display: inline-block;
    padding: 8px 24px;
    border: 1.5px solid #1d1d1f;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
    background: #ffffff;
    transition: all 0.2s ease;
}

.reference-pill:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.sub-heading-caps {
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--theme-primary, #47838b) !important;
    margin-top: 30px;
    margin-bottom: 12px;
}

.compliance-note-box {
    background-color: #f4f7f9; 
    border-left: 4px solid var(--theme-primary, #47838b);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #1d1d1f;
}

.inline-bold-title {
    font-weight: 600;
    color: #1d1d1f;
}

.page-intro-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 20px;
    text-align: center;
}

/* ==========================================================================
   8. SETTINGS ICON & NAV OVERRIDES
   ========================================================================== */
.nav-controls button {
    background-color: #ffffff !important;
    border-radius: 50% !important;
    padding: 8px !important;
    height: 40px !important;
    width: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-controls button:hover {
    transform: scale(1.05);
}
/* ==========================================================================
   9. SPLIT SCREEN WIZARD LAYOUT
   ========================================================================== */
.split-layout {
    display: flex;
    height: calc(100vh - 65px); /* Full height minus navbar */
    overflow: hidden;
    background-color: #f5f5f7;
}

.wizard-sidebar {
    flex: 0 0 45%;
    max-width: 600px;
    background-color: #ffffff;
    overflow-y: auto;
    padding: 30px;
    border-right: 1px solid #e5e5ea;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 10;
}

.live-preview-pane {
    flex: 1;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    background-color: #e5e5ea;
    position: relative;
}

/* The A4 HTML Representation */
.a4-page {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: var(--preview-margin, 20mm);
    font-family: var(--preview-font, 'Calibri', sans-serif);
    color: #000000;
}

.download-btn-container {
    position: fixed;
    bottom: 30px;
    right: 40px;
    z-index: 100;
}

.btn-primary {
    background-color: var(--theme-primary);
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Form Styling Additions */
.section-block {
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fcfcfc;
}

.parsed-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e5e5ea;
    padding: 10px;
    border-radius: 6px;
}

.parsed-item input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: #86868b;
    padding: 4px;
}

.btn-icon:hover {
    color: #dc3545;
}