/* Import Modern Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* CSS Variables for Premium Theme System */
:root {
    /* Theme-Independent Brand Colors */
    --color-primary: #1d4381;       /* Deep Hospital Blue */
    --color-primary-light: #2e60ad;
    --color-primary-dark: #0f2347;
    --color-accent: #0ea5e9;        /* Laser/Ophthalmic Cyan */
    --color-accent-rgb: 14, 165, 233;
    --color-success: #10b981;       /* Active indicator */
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Default Dark Theme variables (matches website default theme) */
    --color-bg: #070b19;
    --color-bg-card: rgba(15, 23, 42, 0.55);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(14, 165, 233, 0.3);
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-glass-header: rgba(7, 11, 25, 0.75);
    --color-hero-bg: radial-gradient(at 0% 0%, rgba(29, 67, 129, 0.35) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.2) 0px, transparent 50%),
                      radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.95) 0px, transparent 70%);
    --bg-mesh: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(14, 165, 233, 0.2);
    --card-hover-bg: rgba(15, 23, 42, 0.8);
    --pill-bg: rgba(255, 255, 255, 0.05);
    --color-input-bg: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] {
    /* Light Theme variables */
    --color-bg: #f8fafc;
    --color-bg-card: #ffffff;
    --color-border: rgba(15, 23, 42, 0.08);
    --color-border-hover: rgba(29, 67, 129, 0.3);
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-glass-header: rgba(248, 250, 252, 0.85);
    --color-hero-bg: radial-gradient(at 0% 0%, rgba(29, 67, 129, 0.15) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.08) 0px, transparent 50%),
                      radial-gradient(at 50% 100%, rgba(241, 245, 249, 0.95) 0px, transparent 70%);
    --bg-mesh: radial-gradient(rgba(29, 67, 129, 0.03) 1px, transparent 1px);
    --shadow-premium: 0 20px 40px -15px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 30px rgba(29, 67, 129, 0.12);
    --card-hover-bg: #f1f5f9;
    --pill-bg: rgba(29, 67, 129, 0.05);
    --color-input-bg: rgba(15, 23, 42, 0.01);
}

/* Base resets & Layout */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    height: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Mesh Backdrop */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--color-hero-bg);
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-mesh);
    background-size: 32px 32px;
    z-index: -1;
    opacity: 0.7;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

p {
    color: var(--color-text-muted);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navbar */
.app-header {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-glass-header);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 2.25rem;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.2));
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-text-main) 30%, var(--color-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link-btn {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.nav-link-btn:hover {
    color: var(--color-accent);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--pill-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: rotate(15deg) scale(1.05);
}

/* Hero Section */
.hero {
    padding: 4.5rem 0 3rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: var(--color-accent);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    color: var(--color-text-main);
    margin-bottom: 1.25rem;
    max-width: 800px;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.btn-primary {
    background: var(--color-accent);
    color: #070b19;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    padding: 0.85rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background: var(--pill-bg);
    border-color: var(--color-text-muted);
    transform: translateY(-1px);
}

/* Dashboard Filter & Search Box */
.dashboard-controls {
    margin-bottom: 3rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow-premium);
}

@media (min-width: 768px) {
    .dashboard-controls {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 450px;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 1.15rem;
}

.search-control {
    width: 100%;
    background: var(--color-input-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 0.85rem 1.25rem 0.85rem 2.75rem;
    color: var(--color-text-main);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

.search-control:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.15);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--pill-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.5rem 1.15rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    color: var(--color-text-main);
    border-color: var(--color-text-muted);
}

.filter-btn.active {
    background: var(--color-accent);
    color: #070b19;
    border-color: var(--color-accent);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
}

/* Jobs Listings Grid */
.jobs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .jobs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .jobs-grid.single-col {
        grid-template-columns: 1fr;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

.job-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    border-radius: 1.25rem;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.job-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-glow), var(--shadow-premium);
    background: var(--card-hover-bg);
}

.job-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
}

.job-card-project {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.job-meta-list {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.job-meta-item i {
    color: var(--color-accent);
    width: 1rem;
    text-align: center;
}

/* Detail & Layout structure for job-details.html */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (min-width: 992px) {
    .detail-layout {
        grid-template-columns: 2.2fr 1fr;
    }
}

.detail-main {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-premium);
}

.detail-section {
    margin-bottom: 2.5rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3, .detail-section h4 {
    color: var(--color-text-main);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}

.detail-section p {
    margin-bottom: 1rem;
}

.detail-section ul {
    list-style-position: inside;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.detail-section li {
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
}

.sidebar-widget-title {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

/* Application Page Specific Cards */
.apply-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 3.5rem 2.5rem;
    max-width: 750px;
    margin: 2rem auto 4rem auto;
    box-shadow: var(--shadow-premium);
    text-align: center;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2.5rem 0;
    text-align: left;
}

@media (min-width: 576px) {
    .steps-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.step-card {
    flex: 1;
    background: var(--pill-bg);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
}

.step-number {
    position: absolute;
    top: -0.75rem;
    left: 1.5rem;
    background: var(--color-accent);
    color: #070b19;
    font-weight: 800;
    font-size: 0.85rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.step-title {
    font-size: 1rem;
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
    color: var(--color-text-main);
}

.step-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Footer Section */
.app-footer {
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    background: rgba(4, 7, 18, 0.6);
    margin-top: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand-title {
    font-size: 1.25rem;
    font-weight: 800;
}

.footer-brand-desc {
    font-size: 0.9rem;
    max-width: 320px;
}

.footer-title {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-main);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 4px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.85rem;
}

.footer-contact-item i {
    color: var(--color-accent);
    font-size: 1.1rem;
    margin-top: 0.15rem;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-socials {
    display: flex;
    gap: 1.25rem;
}

.social-icon {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    transition: var(--transition-smooth);
}

.social-icon:hover {
    color: var(--color-accent);
    transform: scale(1.15);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
