/* ===========================
   ENHANCED CAREERS PAGE STYLES
   =========================== */

/* Ensure all careers content stays below header - header uses z-index: 10000 */
.careers-page {
    position: relative;
    z-index: 1;
}

/* Force hero section to stay behind header */
section.hero-section,
.hero-section {
    position: relative !important;
    z-index: 1 !important;
}

.hero-section * {
    z-index: auto !important;
}

/* Additional specificity to ensure it works */
#hero {
    position: relative !important;
    z-index: 1 !important;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --gray-color: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   HERO SECTION
   =========================== */

.hero-section {
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #E8F4FD 0%, #F0F8FF 35%, #E6F2FF 70%, #EBF5FF 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: radial-gradient(ellipse at top right, rgba(93, 204, 255, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at bottom left, rgba(74, 159, 255, 0.06) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%234A9FFF" fill-opacity="0.04"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 1px 1px, rgba(74,159,255,0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: drift 20s infinite linear;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(40px, 40px, 0); }
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 40px 0;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 159, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 100px;
    color: #1E5BB8;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(74, 159, 255, 0.2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: #081120;
    margin-bottom: 24px;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(90deg, #2B6EC6, #4A9FFF, #5DCCFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 20px;
    color: #77787B;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #081120;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #77787B;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 1;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 120px;
}

/* ===========================
   SEARCH SECTION
   =========================== */

.search-section {
    padding: 80px 0 60px;
    background: white;
}

.search-container {
    max-width: 1000px;
    margin: 0 auto;
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.search-header p {
    font-size: 18px;
    color: var(--gray-color);
}

.search-filters {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 32px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-group {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
}

.search-group:hover {
    background: #e5e7eb;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--gray-color);
    z-index: 1;
}

.search-input, .search-select {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--dark-color);
    outline: none;
}

.search-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

.search-button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quick-filters {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: var(--gray-color);
    font-weight: 600;
}

.filter-chip {
    padding: 8px 16px;
    background: var(--light-gray);
    border: 2px solid transparent;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-chip:hover {
    background: #e5e7eb;
}

.filter-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

/* ===========================
   POSITIONS SECTION
   =========================== */

.positions-section {
    padding: 60px 0 80px;
    background: #fafafa;
}

.positions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.positions-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 100px;
    font-size: 18px;
    font-weight: 700;
}

.view-options {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:hover, .view-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

.positions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.positions-list .position-card-wrapper {
    width: 100%;
}

.positions-list .position-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 140px;
    max-height: none;
    height: auto;
    padding: 0;
}

.positions-list .card-header {
    flex-shrink: 0;
    width: 160px;
    border-bottom: none;
    border-right: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 12px;
}

.positions-list .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 30px;
    gap: 8px;
    min-width: 0; /* Prevent overflow */
}

.positions-list .card-footer {
    padding: 20px 30px;
    border-top: none;
    border-left: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 200px;
}

/* List view specific element adjustments */
.positions-list .position-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.positions-list .company-name {
    margin: 0;
    font-size: 14px;
}

.positions-list .position-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 4px 0;
}

.positions-list .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.positions-list .salary-range {
    font-size: 14px;
    margin: 4px 0;
}

.positions-list .tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.positions-list .tech-tag {
    padding: 2px 8px;
    font-size: 11px;
}

.positions-list .btn-view-details {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 14px;
}

.positions-list .posted-info {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.positions-list .card-badges {
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.positions-list .badge {
    font-size: 11px;
    padding: 3px 8px;
}

.position-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 0;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.position-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-logo {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.card-badges {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-remote {
    background: #dbeafe;
    color: #1e40af;
}

.badge-hybrid {
    background: #fce7f3;
    color: #be185d;
}

.badge-new {
    background: #d1fae5;
    color: #065f46;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.card-body {
    padding: 24px;
    flex: 1;
}

.position-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

.company-name {
    font-size: 16px;
    color: var(--gray-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-name i {
    color: var(--primary-color);
    font-size: 14px;
}

.position-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--gray-color);
}

.meta-item i {
    color: var(--primary-light);
    font-size: 12px;
}

.salary-range {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.salary-range i {
    color: #065f46;
}

.salary-amount {
    font-size: 18px;
    font-weight: 700;
    color: #065f46;
}

.salary-period {
    font-size: 14px;
    color: #047857;
    margin-left: 4px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tech-tag {
    padding: 4px 12px;
    background: var(--light-gray);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-color);
}

.card-footer {
    padding: 20px 24px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.posted-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-color);
}

.btn-view-details {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-view-details:hover {
    background: var(--primary-dark);
    transform: translateX(4px);
}

/* ===========================
   LOADING & NO RESULTS
   =========================== */

.loading-container, .no-results-container {
    padding: 80px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-card, .no-results-card {
    text-align: center;
    max-width: 400px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    position: relative;
}

.spinner-circle {
    width: 100%;
    height: 100%;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-results-illustration {
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results-illustration img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

/* ===========================
   BENEFITS SECTION
   =========================== */

.benefits-section {
    padding: 80px 0;
    background: white;
}

.section-header {
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: var(--gray-color);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.benefit-card {
    text-align: center;
    padding: 32px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.benefit-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.benefit-card p {
    font-size: 15px;
    color: var(--gray-color);
    line-height: 1.6;
}

/* ===========================
   CTA SECTION
   =========================== */

.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cta-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
}

.cta-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.btn-cta-primary, .btn-cta-secondary {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-cta-primary {
    background: white;
    color: var(--primary-color);
    padding: 16px 40px;
    font-size: 18px;
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: #f0f0f0;
}

.btn-cta-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-cta-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* ===========================
   PAGINATION
   =========================== */

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

/* ===========================
   BUTTONS
   =========================== */

.btn-primary {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1024px) {
    .positions-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 28px;
    }

    .search-filters {
        padding: 20px;
    }

    .positions-grid {
        grid-template-columns: 1fr;
    }

    /* List view responsive adjustments */
    .positions-list .position-card {
        flex-direction: column;
        min-height: auto;
    }

    .positions-list .card-header {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        flex-direction: row;
        padding: 15px 20px;
    }

    .positions-list .card-body {
        padding: 15px 20px;
        width: 100%;
    }

    .positions-list .card-footer {
        width: 100%;
        border-left: none;
        border-top: 1px solid #f0f0f0;
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 20px;
    }

    .positions-list .card-badges {
        flex-direction: row;
    }

    .positions-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-cta-primary, .btn-cta-secondary {
        width: 100%;
        justify-content: center;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 500px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .quick-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-chip {
        width: 100%;
        justify-content: center;
    }
}