/* --- CSS Variables for Branding & Consistency --- */
:root {
    --color-primary: #331a5c;       /* Deep Purple */
    --color-primary-light: #4a2582; /* Lighter Purple for hover/tags */
    --color-background: #f0f2f5;    /* Very Light Gray Background */
    --color-card-bg: #ffffff;
    --color-text-dark: #1f2937;     /* Main text */
    --color-text-gray: #4b5563;     /* Detail/body text */
    --color-salary: #059669;        /* Highlight Green */
    --border-radius: 10px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Soft, modern shadow */
}

/* FIX: Global Box Sizing to prevent padding/borders from creating overflows */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- Base Styles --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-dark);
    margin: 0;
    line-height: 1.6;
    /* CRITICAL FIX: Ensure no unwanted horizontal scroll caused by content pushing boundaries */
    overflow-x: hidden; 
}

/* --- Global Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* The primary source of horizontal spacing */
    padding: 20px; 
    width: 100%; /* Ensure container respects its boundary */
}

.card {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 24px;
}


 /* --- Header Styles (Provided and Adjusted) --- */
 .header {
    background-color: var(--color-primary);
    color: white;
    padding: px 20px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    height: var(--header-height); /* Set height explicitly */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo_con{
    width: 120px;
    height: 40px;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    border-radius: 10px;
}
.logo{
    width: 120px;
    height: 40px;
    object-fit: cover;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.menu-icon {
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- Dropdown Styles (Adjusted for Click and Scroll) --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: var(--color-primary);
    padding: 3px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Added subtle border */
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.dropdown-btn:hover {
     background: var(--color-primary-light);
}

.dropdown-content {
    /* JS will handle visibility with .show-dropdown */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: visibility 0.2s, opacity 0.2s, transform 0.2s;
    
    position: absolute;
    right: 0;
    background-color: var(--color-card-bg);
    min-width: 180px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    z-index: 10; /* Above job content */
    margin-top: 5px;

    /* FIX: Scrollable content */
    max-height: 300px; /* Set max height */
    overflow-y: auto;  /* Enable vertical scroll */
}

.dropdown-content.show-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--color-text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: var(--color-background);
    color: var(--color-primary);
}


/* FIX: Force long words/URLs to break inside the text containers */
.text-content, .requirements-list, .fact-value {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* --- Icon & SVG Helper --- */
.icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* --- 1. Header and Banner Section --- */
.job-header-section {
    background-color: var(--color-background);
    margin-top: 70px;
}

.banner-wrapper {
    height: 150px; 
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: -40px; 
    z-index: 1;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    display: block;
}

.header-content-card {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius);
    padding: 20px; 
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow);
    /* CRITICAL FIX: Removed mobile horizontal margin (was 0 20px) to rely solely on .container padding */
    margin: 0; 
}

/* Title Responsiveness Fix: Smaller base size on mobile */
.job-title {
    font-size: 1.75rem; 
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.1;
}

.meta-bar {
    display: flex;
    flex-wrap: wrap; 
    gap: 12px 16px; 
    font-size: 0.9rem;
    color: var(--color-text-gray);
    font-weight: 600;
}

.meta-item {
    display: flex;
    align-items: center;
    min-width: 100px; 
}

.meta-item svg {
    color: var(--color-primary-light);
}

/* --- 2. Main Content Grid (Single Column) --- */
.content-grid {
    display: grid;
    gap: 30px; 
    /* Enforce single column for all screens */
    grid-template-columns: 1fr; 
    padding-top: 24px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Section Titles --- */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-background);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* --- Requirements List Styling --- */
.requirements-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.requirements-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--color-text-gray);
}
.requirements-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-salary);
    font-weight: 800;
    font-size: 1.1rem;
}

/* --- 3. Key Job Details Section --- */
.key-details-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Default: 2 columns for quick facts on small screens */
.quick-facts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 16px;
}

.fact-item-card {
    padding: 16px;
    border-radius: var(--border-radius);
    background-color: var(--color-background);
}

.fact-label {
    font-size: 0.8rem;
    color: var(--color-text-gray);
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.fact-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-dark);
    /* Ensuring fact values break correctly if they are long strings (e.g., long city name) */
    word-break: break-word;
}

/* Salary Highlight */
.fact-salary .fact-value {
    color: var(--color-salary);
    font-size: 1.3rem;
}
.fact-salary .fact-label svg {
    color: var(--color-salary);
}

/* --- CTA Button Styling (Link) --- */
.cta-button-card {
    padding: 24px;
    text-align: center;
}
.cta-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    text-decoration: none;
    font-size: 1.1rem; 
    font-weight: 700;
    border-radius: 8px;
    color: var(--color-card-bg);
    background-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(51, 26, 92, 0.4);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51, 26, 92, 0.6);
}


/* --- 4. Responsive Design (Desktop) --- */
@media (min-width: 1024px) {
    .container {
        padding: 40px 20px;
    }
    
    .header-content-card {
        /* Applying side margin only for spacious desktop view */
        margin: 0 40px;
        padding: 32px; 
    }

    /* Title Responsiveness Fix: Scale up for desktop */
    .job-title {
        font-size: 2.25rem; 
    }

    /* Utilize full width for the facts grid on desktop for a cleaner look */
    .quick-facts-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .banner-wrapper {
         height: 220px;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
     /* Use a 3 or 4 column layout on tablet devices for the facts grid */
     .quick-facts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
