/* 
  style.css - Premium Dark Mode Theme for DigitalContentJobs 
  Designed for DesignScript & D2CMarketer 
*/

:root {
    /* Color Palette */
    --bg-dark: #07090f; /* Deep bluish-black */
    --bg-darker: #040509;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    
    /* Neons & Accents */
    --accent-cyan: #00f0ff;
    --accent-cyan-glow: rgba(0, 240, 255, 0.4);
    --accent-purple: #8a2be2;
    --accent-purple-glow: rgba(138, 43, 226, 0.4);
    --border-subtle: rgba(255, 255, 255, 0.1);
    
    /* Glassmorphism settings */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Spacing & Transitions */
    --radius-lg: 16px;
    --radius-md: 12px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Prevent horizontal scroll from glowing orbs */
}

/* Ambient Background Glows */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

.glow-1 {
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: var(--accent-purple-glow);
}

.glow-2 {
    bottom: 20%;
    right: -100px;
    width: 500px;
    height: 500px;
    background: var(--accent-cyan-glow);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.glass-panel-solid { /* For modals where background transparency shouldn't show text underneath clearly */
    background: rgba(10, 15, 26, 0.85); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
button, .btn-primary-small, .btn-primary-modal, .btn-secondary {
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition-fast);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-primary-small, .btn-primary-modal {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(138, 43, 226, 0.1));
    color: var(--text-primary);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.95rem;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.btn-primary-small:hover, .btn-primary-modal:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px var(--accent-cyan-glow);
    transform: translateY(-2px);
}

.btn-primary-modal {
    padding: 14px 32px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    color: white;
    width: 100%;
}
.btn-primary-modal:hover {
    box-shadow: 0 0 30px var(--accent-purple-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 8px 20px;
    border-radius: 100px;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Navigation */
.navbar {
    padding: 24px 0;
    position: relative;
    z-index: 10;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo {
    height: 36px;
    border-radius: 8px; /* Depending on the logo asset */
}
.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}
.nav-item:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0 60px;
    position: relative;
    z-index: 10;
}
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981; /* neon green */
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Controls / Filters */
.controls-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    margin-bottom: 40px;
}
@media (min-width: 768px) {
    .controls-section {
        flex-direction: row;
        align-items: center;
        border-radius: 100px; /* pill shape on desktop */
        padding: 16px 24px;
    }
}

.search-box {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    padding: 8px 0;
}
@media (max-width: 767px) {
    .search-box {
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 16px;
    }
}
.search-icon {
    color: var(--text-secondary);
    font-size: 1.1rem;
}
.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: var(--font-main);
    width: 100%;
    outline: none;
}
.search-box input::placeholder {
    color: var(--text-secondary);
}

.filters {
    flex: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
@media (min-width: 768px) {
    .filters {
        justify-content: flex-end;
    }
}
.custom-select-wrapper {
    position: relative;
    flex: 1;
    min-width: 140px;
}
.custom-select-wrapper select {
    appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 12px 36px 12px 16px;
    border-radius: 100px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}
.custom-select-wrapper select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.custom-select-wrapper::after {
    content: '\f078';
    font-family: 'FontAwesome';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 0.8rem;
}

/* Job Cards Grid */
.job-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 80px;
}
@media (min-width: 640px) { .job-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .job-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .job-grid { grid-template-columns: repeat(4, 1fr); } }

/* Single Card */
.job-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    cursor: pointer; /* indicates full card is clickable like a native app */
}
.job-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, transparent);
    transition: var(--transition-fast);
}
.job-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}
.job-card:hover::before {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
}

.job-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}
.job-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: white; /* to ensure logos with transparent bgs look good */
    object-fit: contain;
    padding: 4px;
    border: 1px solid var(--border-subtle);
}

.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-type { background: rgba(0, 240, 255, 0.1); color: var(--accent-cyan); border: 1px solid rgba(0, 240, 255, 0.2); }
.badge-company { background: rgba(138, 43, 226, 0.1); color: #d8b4fe; border: 1px solid rgba(138, 43, 226, 0.2); }

.job-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.job-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    flex-grow: 1; /* pushes button to bottom */
}
.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}
.detail-label {
    color: var(--text-secondary);
}
.detail-value {
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.job-card .btn-secondary {
    width: 100%;
    margin-top: auto;
}

/* Modal Overlay Data List Updates */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}
.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-container {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.5rem;
    border: none;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--accent-cyan); }
@media (min-width: 768px) {
    .modal-close { top: 20px; right: 20px; z-index: 10; font-size: 1.25rem; }
}

.modal-content {
    overflow-y: auto;
    max-height: 85vh;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .modal-content { padding: 48px; }
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Structured Job Description in Modal */
.modal-header-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}
@media (min-width: 768px) {
    .modal-header-layout {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.modal-job-title {
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 800;
}
.modal-job-meta {
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.modal-job-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.modal-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: white;
    object-fit: contain;
    padding: 8px;
    border: 1px solid var(--border-subtle);
}

.modal-description {
    color: #cbd5e1;
    font-size: 1.05rem;
}

/* Beautiful formatting for Markdown/plaintext descriptions */
.modal-description p {
    margin-bottom: 16px;
}
/* Handing the raw breaks in description */
.modal-description { width: 100%; white-space: pre-wrap; line-height: 1.7; }
.modal-description strong {
    color: var(--text-primary);
    display: block;
    margin-top: 24px;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.modal-apply-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: center;
}

/* Utilities States */
.loading-state, .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.hidden { display: none !important; }
