/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #000000;
    position: relative;
    height: 120px;
    width: 100%;
}

.logo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.logo img {
    width: 120px;
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

nav ul li a:not(.active):hover {
    color: #4a90e2;
    border: 3px solid transparent;
    background: 
        linear-gradient(rgba(26, 26, 26, 0.8), rgba(45, 45, 45, 0.8)) padding-box,
        linear-gradient(90deg, 
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2)
        ) border-box;
    background-size: 100%, 200% 100%;
    animation: flowingBorder 2s linear infinite;
}

nav ul li a.active {
    color: #4a90e2;
    font-weight: 900;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) padding-box,
                linear-gradient(45deg, #4a90e2, #4a90e2, #4a90e2, #4a90e2) border-box;
    background-size: 100% 100%, 400% 400%;
    animation: navFlowingBorder 15s ease-in-out infinite;
    box-shadow: 
        0 0 20px rgba(74, 144, 226, 0.4),
        0 8px 25px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Keyframes for navigation flowing border */
@keyframes navFlowingBorder {
    0% {
        background-position: 0% 0%, 0% 0%;
    }
    25% {
        background-position: 0% 0%, 100% 0%;
    }
    50% {
        background-position: 0% 0%, 100% 100%;
    }
    75% {
        background-position: 0% 0%, 0% 100%;
    }
    100% {
        background-position: 0% 0%, 0% 0%;
    }
}

/* Jobs Hero Section */
.jobs-hero {
    height: 300px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../bilder/bakgrunn-regler.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.jobs-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.jobs-hero h1 {
    font-size: 3.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
}

/* Jobs Container */
.jobs-container {
    min-height: 60vh;
    padding: 20px 0;
}

/* Jobs Section */
.jobs-section {
    padding: 60px 20px;
    background-color: #1a1a1a;
    text-align: center;
}

.jobs-section h2 {
    color: #4a90e2;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.job-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.job-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.job-name {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 10px;
}


.job-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-size 0.3s ease;
    /* Default decorative ring (subtle) */
    border: 3px solid transparent;
    background: 
        linear-gradient(#333, #333) padding-box,
        linear-gradient(90deg, 
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.12),
            var(--primary-color, #4a90e2)
        ) border-box;
    background-size: 100% 100%, 100% 100%;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.job-image:hover {
    transform: scale(1.05);
    border: 3px solid transparent;
    background: 
        linear-gradient(#333, #333) padding-box,
        linear-gradient(90deg, 
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2)
        ) border-box;
    background-size: 100%, 200% 100%;
    animation: flowingBorder 2s linear infinite;
    box-shadow: 
        0 0 20px rgba(74, 144, 226, 0.6),
        0 4px 15px rgba(74, 144, 226, 0.4);
}

.job-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.job-image:hover img {
    transform: scale(1.1);
}

@keyframes flowingBorder {
    0% {
        background-position: center, 0% center;
    }
    100% {
        background-position: center, 200% center;
    }
}

/* Modal Styles */
.job-details-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    overflow-y: auto;
}

.job-details-modal {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 2px solid transparent;
    background-image: 
        linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%),
        linear-gradient(90deg, 
            var(--primary-color, #4a90e2) 0%, 
            rgba(74, 144, 226, 0.3) 25%,
            var(--primary-color, #4a90e2) 50%,
            rgba(74, 144, 226, 0.3) 75%,
            var(--primary-color, #4a90e2) 100%
        );
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 200% 100%;
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.3);
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    color: white;
    animation: modalBorderFlow 6s linear infinite;
}

@keyframes modalBorderFlow {
    0% {
        background-position: 0% 0%, 0% 0%;
    }
    100% {
        background-position: 0% 0%, 200% 0%;
    }
}

.job-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.job-details-header h3 {
    color: var(--primary-color, #4a90e2);
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.close-button {
    color: var(--primary-color, #4a90e2);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(26, 26, 26, 0.9);
    border: 2px solid var(--primary-color, #4a90e2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-button:hover {
    background-color: var(--primary-color, #4a90e2);
    color: #000;
    transform: rotate(90deg);
}

.job-details-content {
    text-align: center;
}

.job-info-detail {
    display: none;
}


/* Larger modal image and animated ring (copied from backup, blue tuned) */
.modal-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    margin: 0 auto 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* ensure this element stacks above the ::before ring */
    z-index: 3;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-size 0.3s ease;
    border: 4px solid transparent;
    background: 
        linear-gradient(#0d0d0d, #0d0d0d) padding-box,
        linear-gradient(90deg, 
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.12),
            var(--primary-color, #4a90e2)
        ) border-box;
    background-size: 100% 100%, 100% 100%;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.06), 0 4px 15px rgba(0,0,0,0.3);
}

.modal-image:hover {
    transform: scale(1.05);
    background-size: 100% 100%, 200% 100%;
    animation: flowingBorder 2s linear infinite;
    box-shadow: 0 0 30px rgba(74,144,226,0.35), 0 8px 30px rgba(0,0,0,0.4);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.modal-image-wrap {
    display: block;
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
    position: relative;
    border-radius: 50%;
    z-index: 2;
    overflow: visible;
    transition: transform 0.25s ease;
    transform-origin: center center;
}

.modal-image-wrap::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    background-image: 
        linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%),
        linear-gradient(90deg,
            var(--primary-color, #4a90e2) 0%, 
            rgba(74, 144, 226, 0.3) 25%,
            var(--primary-color, #4a90e2) 50%,
            rgba(74, 144, 226, 0.3) 75%,
            var(--primary-color, #4a90e2) 100%
        );
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 200% 100%;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.18);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.25s ease;
    transform: scale(0.98);
    pointer-events: none;
    z-index: 1;
}

.modal-image-wrap:hover {
    transform: scale(1.05);
}

.modal-image-wrap:hover::before {
    opacity: 1;
    transform: scale(1);
    animation: modalBorderFlow 6s linear infinite;
}

/* Center modal content and constrain text width for readability */
.job-details-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.job-info-detail {
    width: 100%;
    max-width: 520px;
}

.job-info-detail > p,
.job-info-detail > div,
.job-info-detail > ul {
    text-align: left;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.job-info-detail p {
    color: #ddd;
    font-size: 1rem;
    margin: 15px 0;
    line-height: 1.6;
    text-align: left;
    padding: 0 20px;
}

.job-info-detail div {
    color: #ddd;
    font-size: 1rem;
    margin: 15px 0;
    line-height: 1.6;
    text-align: left;
    padding: 0 20px;
}

.job-info-detail ul {
    list-style: none;
    padding-left: 20px;
    margin: 10px 0;
}

.job-info-detail li {
    position: relative;
    padding-left: 20px;
    margin: 5px 0;
}

.job-info-detail li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color, #4a90e2);
    font-weight: bold;
}

.job-info-detail strong {
    color: var(--primary-color, #4a90e2);
}

/* Non-whitelist Section */
.non-whitelist-jobs-section {
    padding: 60px 20px;
    background-color: #111111;
    text-align: center;
}

.non-whitelist-jobs-section h2 {
    color: #4a90e2;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.non-whitelist-jobs-section > p {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.jobs-timeline {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
}

.job-info-card {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    position: relative;
    border-left: 4px solid #4a90e2;
    transition: transform 0.3s ease;
}

.job-info-card:hover {
    transform: translateX(10px);
}

.job-info-card h3 {
    color: #4a90e2;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.job-info-card p {
    color: #ffffff;
    line-height: 1.6;
    font-size: 1.1rem;
}

.start-info {
    margin-top: 40px;
    font-size: 1.2rem;
    color: #4a90e2;
    font-weight: bold;
}

/* Footer */
footer {
    background-color: #0a0a0a;
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    gap: 40px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    color: #4a90e2;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    color: #fff;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-section p a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-section p a:hover {
    color: #6bb6ff;
    text-decoration: underline;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-section ul li a:hover {
    color: #4a90e2;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #fff;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #4a90e2;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #222;
    text-align: center;
}

.footer-bottom p {
    color: #fff;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .jobs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .jobs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    .logo {
        position: static;
        transform: none;
        margin-bottom: 20px;
    }

    nav ul {
        flex-wrap: wrap;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .jobs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-section {
        margin-bottom: 20px;
    }

    .social-links {
        justify-content: center;
    }

    .modal-content {
        margin: 20px;
        padding: 20px;
    }

    .job-details p {
        padding: 0 10px;
    }

    .job-info-card {
        padding: 20px;
    }

    .job-info-card h3 {
        font-size: 1.2rem;
    }

    .job-info-card p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .jobs-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .jobs-section h2,
    .non-whitelist-jobs-section h2 {
        font-size: 2rem;
    }

    .modal-image {
        width: 150px;
        height: 150px;
    }

    .job-details h3 {
        font-size: 1.5rem;
    }
}
