/* Corporate Light Theme - VirtualWork.ph */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    /* Color Palette */
    --primary: #0F3460;
    /* Deep Navy Blue */
    --secondary: #E94560;
    /* Professional Accent Red/Pink - used sparingly or switch to a blue-ish accent? 
                             Let's stick to a safe Corporate Blue Accent instead to be "Professional" */
    --accent: #16213E;
    /* Darker Navy */
    --highlight: #2F80ED;
    /* Bright Blue for buttons/links */

    --bg-body: #FFFFFF;
    --bg-light: #F9FAFB;
    /* Very light gray for section separation */
    --bg-white: #FFFFFF;

    --text-main: #1A202C;
    /* Dark Gray/Black */
    --text-muted: #4A5568;
    /* Slate Gray */
    --text-light: #FFFFFF;

    --border: #E2E8F0;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    --container-width: 1200px;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    /* Sticky Footer Setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-top: 0;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1rem 2rem;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--highlight);
}

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

.text-success {
    color: #15803d;
}

.text-danger {
    color: #b91c1c;
}

.text-right {
    text-align: right;
}

.text-small {
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    /* Hard corners or slight radius for corporate */
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #b02a37;
}

.btn-success {
    background-color: #15803d;
    color: #fff;
}

.btn-success:hover {
    background-color: #166534;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Header */
header {
    background-color: #fff;
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    /* Context for mobile menu */
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.05em;
    text-transform: uppercase;
    z-index: 1002;
    /* Above mobile menu */
}

/* Desktop Navigation */
nav ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--highlight);
}

.nav-link.text-highlight {
    color: var(--secondary);
}

/* Dropdown (Desktop) */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '\25BE';
    /* Down caret */
    font-size: 0.8em;
    margin-left: 4px;
    display: inline-block;
    transition: transform 0.2s;
}

.nav-item.dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 1100;
    margin-top: 10px;
    border: 1px solid var(--border);
}

.dropdown-menu::before {
    /* Little triangle arrow */
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--border);
}

.dropdown-menu::after {
    /* Triangle overlay for white background */
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.nav-item.dropdown.show .dropdown-menu {
    display: block;
    animation: fadeInSlide 0.2s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
    text-transform: none;
    /* Reset uppercase */
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

.nav-btn.btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.nav-logout-form {
    margin: 0;
}


/* Mobile Navigation */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    padding: 0;
    z-index: 1002;
    /* Above menu */
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {

    /* Breakpoint */
    .menu-toggle {
        display: flex;
    }

    /* Animate Hamburger to X */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        /* Overlay */
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s;
        z-index: 1001;
    }

    nav.active {
        visibility: visible;
        opacity: 1;
    }

    /* The Drawer */
    nav ul {
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 0;
        left: 0;
        /* Changed from right to left or right slide-in */
        right: 0;
        padding: calc(var(--header-height) + 2rem) 2rem 2rem;
        background-color: white;
        height: auto;
        min-height: 50vh;
        max-height: 100vh;
        overflow-y: auto;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: 0;
        /* Remove gap, handle with padding */
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    }

    nav.active ul {
        transform: translateY(0);
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
        font-size: 1.1rem;
        width: 100%;
    }

    /* Mobile Dropdown (Accordion) */
    .dropdown-menu {
        position: static;
        /* Stack flow */
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        background: var(--bg-light);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        min-width: 100%;
    }

    .dropdown-menu::before,
    .dropdown-menu::after {
        display: none;
    }

    .nav-item.dropdown.show .dropdown-menu {
        display: block;
        max-height: 300px;
        /* Arbitrary large height */
        animation: none;
    }

    .dropdown-item {
        padding: 0.8rem 2rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        color: var(--text-muted);
    }

    .nav-btn.btn {
        width: 100%;
        text-align: center;
        margin-top: 1.5rem;
    }

    .nav-logout-form {
        width: 100%;
        padding: 1rem 0;
    }
}

/* Sections */
section {
    padding: 6rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

/* Hero */
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    /* Or a clean white background with a subtle graphic */
    background: #fff;
}

.hero p.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 2.5rem;
}

/* Cards / Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

@media (max-width: 768px) {

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }
}

.card {
    background: #fff;
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    /* Slight radius */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--highlight);
}

/* Forms */
form .form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

input,
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

/* Backend / Dashboard UI */
.backend-page {
    padding: 4rem 0;
}

.backend-hero {
    padding: 4rem 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.backend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.backend-header .lead {
    margin: 0.35rem 0 0;
}

.backend-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.backend-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.stack-sm {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.backend-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.backend-card-main {
    flex: 1;
    min-width: 260px;
}

.backend-meta {
    margin: 0.25rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.backend-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.back-link {
    color: var(--text-muted);
    font-weight: 600;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.form-card {
    margin: 0 auto;
}

.form-card--narrow {
    max-width: 600px;
}

.form-card--medium {
    max-width: 800px;
}

.form-card--wide {
    max-width: 900px;
}

.form-actions {
    text-align: right;
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.form-check input[type="checkbox"] {
    margin-top: 0.2rem;
}

.backend-page select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: linear-gradient(45deg, transparent 50%, #4a5568 50%),
        linear-gradient(135deg, #4a5568 50%, transparent 50%),
        linear-gradient(to right, #e2e8f0, #e2e8f0);
    background-position: calc(100% - 18px) calc(50% - 3px),
        calc(100% - 13px) calc(50% - 3px),
        calc(100% - 2.5rem) 50%;
    background-size: 5px 5px, 5px 5px, 1px 1.5rem;
    background-repeat: no-repeat;
    padding-right: 2.5rem;
}

.backend-page input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--highlight);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: 2rem;
    font-weight: 600;
}

.alert-success {
    background: #ecfdf3;
    border-color: #b7f5d0;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}

.alert-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.table th,
.table td {
    padding: 0.9rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table thead th {
    background: var(--bg-light);
    font-weight: 700;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table-subrow td {
    background: #f8fafc;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.list li:last-child {
    border-bottom: none;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notification-item .emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.notification-item .meta {
    color: #6b7280;
    font-size: 0.85rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
    font-size: 0.78rem;
}

.status-select {
    font-size: 0.85rem;
    padding: 0.35rem 2.2rem 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 600;
    background-color: #f8fafc;
}

.status-select[data-status="open"] {
    background-color: #ecfdf3;
    border-color: #a7f3d0;
    color: #065f46;
}

.status-select[data-status="filled"] {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.status-select[data-status="archived"] {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.status-select[data-status="closed"] {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.status-select[data-status="draft"] {
    background-color: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: capitalize;
    font-size: 0.85rem;
}

.status-pill--accepted {
    background: #dcfce7;
    color: #166534;
}

.status-pill--rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-pill--pending {
    background: #e2e8f0;
    color: #334155;
}

.panel {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f9fafb;
}

.panel-danger {
    background: #fff5f5;
    border-color: #fecaca;
}

.link {
    color: var(--highlight);
    text-decoration: underline;
    font-weight: 600;
}

.grid-tight {
    gap: 1.5rem;
}

.offer-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.offer-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.offer-status {
    font-weight: 600;
}

.card-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
}

.mt-sm {
    margin-top: 0.75rem;
}

.mt-md {
    margin-top: 1.5rem;
}

.mb-sm {
    margin-bottom: 0.75rem;
}

.mb-md {
    margin-bottom: 1.5rem;
}

.mb-lg {
    margin-bottom: 2rem;
}

.m-0 {
    margin: 0;
}

.block {
    display: block;
}

.form-inline {
    margin: 0;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
    padding: 4rem 0;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
    color: white;
}

/* Logo Scroller */
.logo-slider {
    background: white;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, .125);
    height: 100px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-slider::before,
.logo-slider::after {
    background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);
    content: "";
    height: 100px;
    position: absolute;
    width: 200px;
    z-index: 2;
}

.logo-slider::after {
    right: 0;
    top: 0;
    transform: rotateZ(180deg);
}

.logo-slider::before {
    left: 0;
    top: 0;
}

.logo-slide-track {
    animation: scroll 30s linear infinite;
    display: flex;
    width: calc(250px * 11 * 2);
    /* 11 logos duplicated once = 22 total slides */
}

.logo-slide {
    height: 100px;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-slide img {
    max-height: 70px;
    /* Reduced from fixed height to max-height */
    max-width: 200px;
    /* Ensure wide logos don't overflow */
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    /* Removed destructive contrast/brightness filters */
    opacity: 0.6;
    /* Slightly lighter for subtle effect */
    transition: all 0.3s ease;
}

.logo-slide img:hover {
    filter: none;
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 11));
        /* Move by exactly one set width */
    }
}
