/* --- Global & Variables --- */
:root {
    /* Green / Blue theme */
    --primary: #05ad29; /* primary green */
    --primary-light: #4fe76a; /* lighter green */
    --primary-dark: #04791e; /* darker green */
    --background: #f7f5ff;
    --foreground: #1e293b;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

/* Make sizing predictable so 100% widths include padding/border */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- Authentication Page Styles --- */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    /* Updated to theme green gradient (replaces previous purple background) */
    background: linear-gradient(180deg, #071b0f 0%, #052a16 100%);
}

.auth-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    /* reduce blur and boost saturation so the pattern is more visible */
    filter: blur(0.6px) saturate(150%);
}

.auth-body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* subtle green overlay matching theme */
    background-color: rgba(5, 173, 41, 0.08);
    z-index: -2;
}


.auth-h1 {
    font-weight: 800;
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    color: var(--foreground);
}
.overlay .auth-h1 {
    color: #ffffff;
    font-weight: 700;
}

.auth-p {
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0.5px;
    margin: 1.5rem 0 2rem 0;
    max-width: 80%;
}

.auth-a {
    color: var(--foreground);
    font-size: 0.875rem;
    text-decoration: none;
    margin: 1rem 0;
    transition: color 0.2s;
}
.auth-a:hover {
    color: var(--primary);
}

.auth-button {
    border-radius: 50px;
    border: 1px solid var(--primary);
    background-color: var(--primary);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.75rem 2.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 80ms ease-in, background-color 0.2s;
    cursor: pointer;
}

.auth-button:active {
    transform: scale(0.95);
}

.auth-button:focus {
    outline: none;
}

.auth-button.ghost {
    background-color: transparent;
    border-color: #FFFFFF;
}
.auth-button.ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.auth-form {
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 3rem;
    height: 100%;
    text-align: center;
}

/* Mobile-only toggles are hidden by default (desktop) */
.mobile-toggle { display: none; }

.auth-input {
    background-color: #ffffff;
    border: 1px solid var(--card-border);
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0.5rem;
    transition: all 0.18s ease;
    color: var(--foreground);
    box-shadow: inset 0 1px 2px rgba(16,24,40,0.03);
}
.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 6px rgba(5,173,41,0.06);
}

.auth-input::placeholder {
    color: #9ca3af; /* slightly darker placeholder for readability */
}


.auth-container {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem; 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    width: 968px;
    max-width: 100%;
    min-height: 620px;
}

/* Back button inside auth tile */
    .auth-back-btn {
        position: absolute;
        top: 1rem;
        left: 1rem;
        z-index: 300;
        background: var(--primary); /* visible on white and dark backgrounds */
        color: #fff;
        border: 1px solid rgba(0,0,0,0.06);
        padding: 0.35rem 0.6rem;
        border-radius: 0.5rem;
        font-weight: 600;
        cursor: pointer;
    }
    .auth-back-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(5,173,41,0.08); }

@media (max-width: 768px) {
    .auth-back-btn {
        /* contrast for light container on mobile */
        background: transparent;
        color: var(--foreground);
        border: 1px solid var(--card-border);
        top: 0.6rem;
        left: 0.6rem;
    }

    /* Move back button out of the tile to top-left of viewport on small screens */
    .auth-back-btn {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 0.6rem);
        left: calc(env(safe-area-inset-left, 0px) + 0.6rem);
        background: rgba(10, 5, 40, 0.9);
        color: #fff;
        border: 1px solid rgba(255,255,255,0.06);
        box-shadow: 0 6px 18px rgba(2,6,23,0.5);
        z-index: 9999;
    }
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container, .sign-up-container {
    background-color: rgba(255, 255, 255, 0.8);
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.auth-container.right-panel-active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
}

.auth-container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.auth-container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: transparent;
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 2.5rem;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.auth-container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
    padding-left: 30px;
}

.auth-container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.auth-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 1.5rem;
    background-color: #f3f4f6;
    border-radius: 50px;
    padding: 0.25rem;
}

.auth-tab {
    flex: 1;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-tab.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-tab-icon {
    width: 1rem;
    height: 1rem;
}

.form-fields {
    width: 100%;
    transition: opacity 0.3s ease-in-out;
}

.form-fields.hidden {
    display: none;
}


.auth-error {
    color: var(--danger);
    font-size: 0.75rem;
    height: 1.25rem;
    margin-bottom: 0.25rem;
}

/* --- Job & Company Page Styles --- */
.filter-input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    background-color: #fdfcff; 
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    transition: all 0.2s ease-in-out;
    font-size: 0.875rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select.filter-input {
    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 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 2px rgba(5, 173, 41, 0.2);
}


/* --- General Site Styles --- */
.hero-gradient {
    background-color: var(--background);
    background-image: radial-gradient(circle at top right, rgba(52,211,153,0.08) 0%, var(--background) 50%);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--foreground);
    margin-bottom: 1rem;
}
.section-subtitle {
    font-size: 1.125rem;
    color: #5a6474;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.5rem;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 9999px;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-lg {
    height: 3rem;
    padding: 0 2rem;
    font-size: 1rem;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(5, 173, 41, 0.39);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
}
.btn-secondary {
    background-color: var(--card-bg);
    color: var(--foreground);
    border-color: var(--card-border);
}
.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Links */
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    opacity: 0.7;
    transition: all 0.2s;
}
.nav-link:hover {
    color: var(--primary);
    opacity: 1;
}
/* Active page indicator for header nav */
.nav-link {
    position: relative;
}
.nav-link.active {
    color: var(--primary);
    font-weight: 700;
    opacity: 1;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
}
.footer-link {
     font-size: 0.875rem;
     color: #4a5568;
     transition: color 0.2s;
}
.footer-link:hover {
    color: var(--primary);
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.07),0 2px 4px -2px rgba(0,0,0,.05);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);
}
.card-icon {
    width: 4rem;
    height: 4rem;
    background-color: #eef2ff;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.card-title-sm {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}
.card-description {
    color: #5a6474;
}

/* Lists and Badges */
.list-item {
    padding: 1rem;
    background-color: var(--background);
    border-radius: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--card-border);
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}
.status-yellow { background-color: #fef3c7; color: #92400e; }
.status-blue { background-color: #dbeafe; color: #1e40af; }
.status-green { background-color: #d1fae5; color: #065f46; }
.status-gray { background-color: #f3f4f6; color: #374151; }
.status-red { background-color: #fee2e2; color: #991b1b; }
.status-purple { background-color: #ecfdf5; color: #065f46; }


/* --- Animations & Loader --- */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-fade-in {
    transform: translateY(20px);
}
.animate-slide-in-up {
    transform: translateY(30px);
}
.animated {
    opacity: 1;
    transform: translateY(0);
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.shimmer-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #e2e8f0; /* slate-200 */
}

.shimmer-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
}

/* Stat Cards for Dashboards */
.stat-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--card-border);
}
.stat-card p {
    color: #64748b;
}
.stat-card .stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--foreground);
    margin-top: 0.5rem;
}
.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.input {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--card-border);
    transition: all 0.2s;
}
.input:disabled {
    background-color: #f8fafc; /* slate-50 */
    cursor: not-allowed;
}
.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(5, 173, 41, 0.2);
}

.skill-badge {
    background-color: var(--primary-light);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* --- Responsive adjustments for Authentication page (mobile) --- */
@media (max-width: 768px) {
    .auth-body {
        /* Center tile vertically and horizontally on mobile */
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 0;
        min-height: 100vh;
        height: 100vh;
        overflow: hidden;
    }

    .auth-video-bg {
        display: none;
    }

    .auth-container {
        width: calc(100% - 2rem);
        max-width: 520px;
        min-height: auto;
        border-radius: 1rem;
        padding: 0.5rem;
        margin: 0 auto;
        box-shadow: none;
        border: none;
        background-color: rgba(255,255,255,0.03);
    }

    .form-container,
    .overlay-container,
    .overlay,
    .overlay-panel {
        position: relative;
        width: 100%;
        left: 0;
        transform: none !important;
        height: auto;
        top: auto;
        display: block;
        padding: 0;
    }

    .sign-in-container,
    .sign-up-container {
        position: relative;
        width: 100%;
        opacity: 1 !important;
        z-index: 2;
        background-color: rgba(255,255,255,0.95);
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }

    /* Mobile: show only one form at a time to avoid confusion */
    .sign-in-container { display: block; }
    .sign-up-container { display: none; }

    /* When toggled via JS (right-panel-active) swap which form is visible */
    .auth-container.right-panel-active .sign-in-container { display: none; }
    .auth-container.right-panel-active .sign-up-container { display: block; }

    .auth-form {
        padding: 1.5rem;
        text-align: left;
    }

    .auth-h1 {
        font-size: 1.25rem;
    }

    .auth-p {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .auth-button {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .auth-tabs {
        gap: 0.25rem;
    }

    .overlay {
        display: none;
    }

    /* Mobile-only toggle link shown inside each form */
    .mobile-toggle {
        display: flex; /* show on small screens */
        justify-content: center;
        align-items: center;
        margin-top: 0.75rem;
        text-align: center;
        font-size: 0.95rem;
        color: #475569;
        gap: 0.35rem;
    }
    .auth-toggle-link {
        background: transparent;
        border: none;
        color: var(--primary);
        font-weight: 700;
        cursor: pointer;
        padding: 0;
        margin-left: 0.35rem;
    }
    .auth-toggle-link:focus { outline: none; }
}

@media (max-width: 420px) {
    .auth-h1 { font-size: 1.1rem; }
    .auth-input { padding: 0.6rem 0.75rem; }
    .auth-button { padding: 0.55rem 0.75rem; }
    .auth-form { padding: 1rem; }
    
/* --- Merged companies.css (kept below to override defaults when needed) --- */
/* Video background and page overlay for companies page */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(247, 245, 255, 0.7); /* Reduced overlay opacity */
    z-index: -1;
}

.video-background {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    z-index: -2;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#page-content {
    position: relative;
    z-index: 1; /* Ensures content is above the background and overlay */
}

/* Job & Company page helpers */
.filter-input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    background-color: #fdfcff; 
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    transition: all 0.2s ease-in-out;
    font-size: 0.875rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select.filter-input {
    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 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 2px rgba(5, 173, 41, 0.2);
}

/* Ensure companies-specific logo wrapper still present (already added globally) */
/* Section titles and buttons (duplicates may override global rules where needed) */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--foreground);
    margin-bottom: 1rem;
}
.section-subtitle {
    font-size: 1.125rem;
    color: #5a6474;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.5rem;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 9999px;
    border: 1px solid transparent;
    cursor: pointer;
}

/* footer and misc helpers kept from companies.css */
.footer-link {
     font-size: 0.875rem;
     color: #4a5568;
     transition: color 0.2s;
}
.footer-link:hover {
    color: var(--primary);
}

/* status badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

}

/* Logo wrapper: rounded border with accent on hover/focus */
.logo-wrap {
    display: inline-block;
    padding: 6px;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: border-color 0.28s ease, box-shadow 0.28s ease, transform 0.15s ease;
}
.logo-wrap {
    display: inline-block;
    padding: 0px;
    border-radius: 0.75rem;
    border: 2px solid rgba(5,173,41,0.14); /* visible but subtle by default */
    transition: border-color 0.28s ease, box-shadow 0.28s ease, transform 0.15s ease;
    background: transparent;
    overflow: hidden;
    position: relative;
    z-index: 1; /* ensure wrapper sits above header background so glow shows */
}
.logo-wrap img {
    display: block;
    width: auto;
    height: auto;
    max-height: 56px; /* constrain tall logo to a reasonable header height */
    position: relative;
    z-index: 2; /* place image above the glow pseudo-element */
}
.logo-wrap:hover,
.logo-wrap:focus-within {
    border-color: rgba(5,173,41,0.0); /* hide solid border while showing animated glow */
    transform: translateY(-2px);
}
.logo-wrap:focus-within { outline: none; }

/* Animated gradient glow behind the logo on hover */
.logo-wrap::after {
    content: '';
    position: absolute;
    inset: -6px;
    z-index: 0; /* behind the image but above the header background */
    border-radius: calc(0.75rem + 6px);
    background: linear-gradient(90deg, rgba(5,173,41,0.95), rgba(80,216,120,0.85));
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s ease;
    background-size: 200% 200%;
}
.logo-wrap:hover::after,
.logo-wrap:focus-within::after {
    opacity: 0.8; /* match header bg opacity (bg-white/80) for visual parity */
    transform: scale(1);
    animation: logoGradientShift 3s linear infinite;
}

@keyframes logoGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Page background canvas common styling */
.page-bg-canvas {
    opacity: 1;
    transition: opacity 280ms ease;
    will-change: transform, opacity;
}

/* Per-section canvas background */
.section-bg-canvas {
    position: absolute;
    inset: 0;
    z-index: 0; /* place above the section background but below content */
    pointer-events: none;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
}

/* Ensure section children render above the canvas */
section[data-bg] > * {
    position: relative;
    z-index: 1;
}

/* Apply About page section/canvas backgrounds to Resources page */
body[data-page="resources"] .page-bg-canvas,
body[data-page="resources"] .section-bg-canvas {
    /* make sure page/section canvases are visible and non-interactive */
    opacity: 1;
    pointer-events: none;
    mix-blend-mode: normal;
    /* place the page canvas above any body overlays but beneath page content (#page-content z-index:1) */
    z-index: 0;
}

/* Ensure Resources page sections using data-bg behave like About page */
body[data-page="resources"] section[data-bg] {
    position: relative;
    overflow: hidden;
    background-clip: padding-box;
}

body[data-page="resources"] section[data-bg] > * {
    position: relative;
    z-index: 1;
}

/* Apply About page section/canvas backgrounds to Companies page */
body[data-page="companies"] .page-bg-canvas,
body[data-page="companies"] .section-bg-canvas {
    /* make sure page/section canvases are visible and non-interactive */
    opacity: 1;
    pointer-events: none;
    mix-blend-mode: normal;
    /* place canvas above body overlays but beneath page content */
    z-index: 0;
}

/* Ensure Companies page sections using data-bg behave like About page */
body[data-page="companies"] section[data-bg] {
    position: relative;
    overflow: hidden;
    background-clip: padding-box;
}

body[data-page="companies"] section[data-bg] > * {
    position: relative;
    z-index: 1;
}

/* Section green shades (decreasing intensity down the page) */
.section-green-1 { background-color: rgba(5,173,41,0.06); }
.section-green-2 { background-color: rgba(5,173,41,0.045); }
.section-green-3 { background-color: rgba(5,173,41,0.03); }
.section-green-4 { background-color: rgba(5,173,41,0.02); }

/* CSS pattern utilities — combine with .section-green-* for layered visuals */
.pattern-stripes {
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 18px, rgba(255,255,255,0) 18px 36px);
    background-blend-mode: overlay;
}
.pattern-dots {
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 18px 18px;
    background-blend-mode: overlay;
}
.pattern-grid {
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-blend-mode: overlay;
}
.pattern-waves {
    background-image: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.04), transparent 25%), radial-gradient(circle at 80% 80%, rgba(255,255,255,0.03), transparent 30%);
    background-blend-mode: overlay;
}

/* Ensure patterns and canvas layer correctly inside sections */
section[class*="section-green-"] { position: relative; overflow: hidden; }
section[class*="section-green-"] > * { position: relative; z-index: 1; }

/* --- Authentication page animated balls background (decorative) --- */
@keyframes move {
    100% {
        transform: translate3d(0, 0, 1px) rotate(360deg);
    }
}

.background {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(4,42,22,0.55) 0%, rgba(3,35,18,0.6) 100%);
    overflow: hidden;
    z-index: -4; /* placed behind auth overlays and container */
    pointer-events: none;
}

.ball {
    position: absolute;
    width: 20vmin;
    height: 20vmin;
    border-radius: 50%;
    backface-visibility: hidden;
    animation: move linear infinite;
}

.ball:nth-child(odd) {
        color: var(--primary-dark); /* darker green tone */
}

.ball:nth-child(even) {
        color: var(--primary-light); /* lighter green tone */
}

.ball:nth-child(1) {
    top: 77%;
    left: 88%;
    animation-duration: 40s;
    animation-delay: -3s;
    transform-origin: 16vw -2vh;
    box-shadow: 40vmin 0 5.703076368487546vmin currentColor;
}
.ball:nth-child(2) {
    top: 42%;
    left: 2%;
    animation-duration: 53s;
    animation-delay: -29s;
    transform-origin: -19vw 21vh;
    box-shadow: -40vmin 0 5.17594621519026vmin currentColor;
}
.ball:nth-child(3) {
    top: 28%;
    left: 18%;
    animation-duration: 49s;
    animation-delay: -8s;
    transform-origin: -22vw 3vh;
    box-shadow: 40vmin 0 5.248179047256236vmin currentColor;
}
.ball:nth-child(4) {
    top: 50%;
    left: 79%;
    animation-duration: 26s;
    animation-delay: -21s;
    transform-origin: -17vw -6vh;
    box-shadow: 40vmin 0 5.279749632220298vmin currentColor;
}
.ball:nth-child(5) {
    top: 46%;
    left: 15%;
    animation-duration: 36s;
    animation-delay: -40s;
    transform-origin: 4vw 0vh;
    box-shadow: -40vmin 0 5.964309466052033vmin currentColor;
}
.ball:nth-child(6) {
    top: 77%;
    left: 16%;
    animation-duration: 31s;
    animation-delay: -10s;
    transform-origin: 18vw 4vh;
    box-shadow: 40vmin 0 5.178483653434181vmin currentColor;
}

/* Subtle blur to create soft shapes and depth */
.background .ball { filter: blur(18px); opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
    .ball { animation: none !important; }
}

