/* Reset some default styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

.jobs-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.job-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    /* Remove or adjust padding/margins related to the image */
}

.job-card:hover {
    transform: translateY(-5px);
}

/* .job-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
} */

.placeholder-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background-color: #eaeaea;
}

.card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #333;
}

.card-content h4 {
    margin-bottom: 10px;
    font-size: 0.75em;
    color: #666;
}

.card-content p {
    flex-grow: 1;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
}

.card-content .date-posted {
    font-size: 0.8em;
    color: #999;
    margin-bottom: 10px;
}

.read-more-button {
    align-self: flex-start;
    padding: 8px 12px;
    background-color: #000000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.read-more-button:hover {
    background-color: #ffffff;
    color: #000000;
    border: solid 1px #000000;
}

/* Modal Overlay */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
    transition: opacity 0.3s ease;
}

/* Modal Content Box */
.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px; /* Max width */
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slide-down 0.4s ease-out;
}

/* Slide-down Animation */
@keyframes slide-down {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin-right: -20px;
    margin-top: -30px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
}

/* Modal Titles */
#modal-job-title {
    margin-top: 0;
    font-size: 28px;
    color: #333;
}

#modal-company-name {
    margin-top: 10px;
    font-size: 22px;
    color: #555;
}

/* Date Posted */
#modal-job-date {
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 16px;
    color: #777;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* Job Description */
.modal-description {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #444;
}

/* Apply Now Button */
.apply-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #000000; /* Green background */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.apply-button:hover {
    background-color: #fcfcfc;
    color: #000000;
    border: 1px solid #000000;
}

/* Responsive Design */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    #modal-job-title {
        font-size: 24px;
    }

    #modal-company-name {
        font-size: 20px;
    }

    .apply-button {
        width: 100%;
        text-align: center;
    }
}

/* New Styles for Lists Within the Modal */

/* Unordered Lists */
.modal-description ul {
    list-style-type: disc;
    margin-left: 20px; /* Indent the list */
    margin-bottom: 15px; /* Space below the list */
}

/* Ordered Lists */
.modal-description ol {
    list-style-type: decimal;
    margin-left: 20px; /* Indent the list */
    margin-bottom: 15px; /* Space below the list */
}

/* List Items */
.modal-description li {
    margin-bottom: 10px; /* Space between list items */
    line-height: 1.5; /* Improve readability */
}

/* Nested Lists */
.modal-description ul ul,
.modal-description ol ol,
.modal-description ul ol,
.modal-description ol ul {
    margin-left: 20px; /* Further indent nested lists */
}

/* Customize List Markers */
.modal-description ul li::marker {
    color: #007BFF; /* Bullet color */
    font-size: 1em; /* Bullet size */
}

.modal-description ol li::marker {
    color: #28a745; /* Number color */
    font-size: 1em; /* Number size */
}

/* Modal styles (reuse existing modal styles) */
.modal-content h2 {
    font-size: 24px;
    color: #333;
}

/* Form styling inside the modal */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form input[type="email"],
form input[type="text"] {
    padding: 10px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ddd;
}

form button.submit-button {
    padding: 10px 20px;
    background-color: #000000;
    color: white;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

form button.submit-button:hover {
    background-color: #ffffff;
    color: #000000;
    border: solid 1px #000000;
}

.modal-description {
    padding-top: 10px;
}

/* Modal success message */
#modal-message {
    color: green;
    font-size: 1em;
}

/* Added Newsletter Signup Link Styles */
#newsletter-link {
    display: block;
    margin-top: 10px;
    font-size: 0.9em;
    color: #4e4e4e;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s;
}

#newsletter-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.small-link {
    font-size: 0.9em;
    color: #4e4e4e;
    text-decoration: none;
    transition: color 0.3s;
}

.small-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Added Newsletter Modal Styles */
#newsletter-modal .modal-content {
    max-width: 400px; /* Adjust width as needed */
}

#newsletter-modal h2 {
    text-align: center;
    margin-bottom: 20px;
}

#newsletter-form {
    display: flex;
    flex-direction: column;
}

#newsletter-form label,
#lock-newsletter-form label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

#newsletter-form input[type="email"] {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#newsletter-form button {
    padding: 10px;
    background-color: #000000; /* Green background */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

#newsletter-form button:hover {
    background-color: #ffffff; 
    color: #000000;
    border: solid 1px #000000;
}

.subscription-message {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: #28a745;
}

.bottom-link-container {
    text-align: center;
    margin-top: 20px;
}

.bottom-link {
    text-decoration: underline;
    color: #545454;
    font-size:0.8em;
    cursor: pointer;
    transition: color 0.3s;
    text-transform: capitalize;
}

.bottom-link:hover {
    color: #000000;
}

/* Lock Modal Styles */
.lock-modal {
    z-index: 1001; /* Higher than regular modals */
}

.lock-modal-content {
    max-width: 500px; /* Larger than regular modal */
    padding: 40px;
    text-align: center;
}

.lock-modal-content h2 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #333;
}

.lock-modal-content p:not(#lock-modal-message) {
    margin-bottom: 25px;
    color: #555;
    font-size: 16px;
    line-height: 1.5;
}

.lock-modal-content p:not(#lock-modal-message) {
    font-weight:bold;
}

.lock-modal-content p#lock-modal-message {
    font-size: 0.9em;
    font-style:italic;
}

.lock-modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lock-modal-content input[type="email"],
.lock-modal-content input[type="text"] {
    padding: 12px 15px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s; /* Added transition */
}

/* Specific styling for the Gumroad license key input field */
#lock-license, #lock-email {
    background-color: #f9f9f9;
    border-left: 3px solid #007BFF; /* Added a distinct left border */
}

#lock-license:focus, #lock-email:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Highlight on focus */
}

.lock-modal-content button.submit-button {
    padding: 12px 20px;
    font-size: 16px;
    background-color: #000000;
    color: white;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.lock-modal-content button.submit-button:hover {
    background-color: #ffffff;
    color: #000000;
    border: solid 1px #000000;
}

/* Styling for the Gumroad purchase link */
.gumroad-purchase-link {
    display: inline-block;
    margin-top: 20px; /* Added space above the link */
    padding: 8px 16px;
    background-color: #e9ecef;
    color: #343a40;
    border-radius: 5px;
    font-size: 0.8em;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #ced4da;
}

.gumroad-purchase-link:hover {
    background-color: #dee2e6;
    color: #000;
    text-decoration: none;
    border-color: #adb5bd;
}


.subscription-message {
    margin-top: 15px;
    font-size: 16px;
}

/* Loading spinner styles */
.loading-spinner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 200px;
    grid-column: 1 / -1; /* Make it span all columns */
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner-container p {
    color: #666;
    font-size: 1em;
}