/* Reset & base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Navbar */
.navbar {
    position: relative;
    top: 0;
    background-color: var(--primary-color);
    padding: clamp(0.5rem, 2vw, 0.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-height: 50px;
}

.navbar-logo {
    font-size: clamp(1.25rem, 2.5vw, 1rem);
    font-weight: 900;
    color: var(--text-color-light);
    letter-spacing: 1.5px;
    user-select: none;
    text-decoration: none;

}

.navbar-logo:hover {
    color: white;
    /* change to your brand accent color */
    cursor: pointer;
}

/* Application deadline css */
.expired {
    color: red;
    font-weight: bold;
}

.navbar-links {
    list-style: none;
    display: flex;
    gap: clamp(0.1rem, 0.1vw, 1rem);
    align-items: center;
}

.navbar-search {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar-search input {
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    max-width: 200px;
    width: 100%;
}

.navbar-search button {
    padding: 6px 12px;
    border: 2px solid var(--bg-color);
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.logout-btn,
.create-job-btn {
    all: unset;
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    color: var(--text-color-light);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
    user-select: none;
}

.create-job-btn:hover,
.navbar-links li a:hover {
    background-color: var(--text-color-light);
    color: black;
    box-shadow: 0 0 10px #7f7f7f;
}

.navbar-links li a {
    text-decoration: none;
    color: var(--text-color-light);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    user-select: none;
}

/* .profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    padding: 5px 8px;
    border-radius: 50%;
    transition: background 0.3s, color 0.3s;
} */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color-light);
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    cursor: pointer;
    user-select: none;
}

/* Responsive Navbar */
@media (max-width: 1024px) {
    .navbar {
        padding: clamp(0.5rem, 1.5vw, 0.75rem);
    }

    .navbar-logo {
        font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    }

    .navbar-links {
        gap: clamp(0.5rem, 1.2vw, 1rem);
    }

    .navbar-search input,
    .navbar-search button {
        font-size: clamp(0.8rem, 1.8vw, 0.9rem);
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .navbar-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70vw;
        max-width: 280px;
        background-color: var(--secondary-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: right 0.3s ease-in-out;
        box-shadow: -2px 0 12px rgba(0, 0, 0, 0.6);
    }

    .navbar-links.active {
        right: 0;
    }

    .navbar-links li a,
    .logout-btn,
    .create-job-btn {
        width: 100%;
        text-align: left;
        font-size: 1.1rem;
        padding: 0.2rem 1rem;
        border-radius: 10px;
    }

    .navbar-links {
        align-items: flex-start;
        padding-left: 10px;
        /* Optional: remove extra padding from container */
    }

    .navbar-search {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;

    }

    .navbar-search input,
    .navbar-search button {
        width: 100%;
        max-width: none;
    }

    .navbar-search button {
        margin-top: 0.5rem;
    }
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    /* space between image and text */
    text-decoration: none;
    /* remove underline */
    user-select: none;
    color: var(--text-color-light);
    font-weight: 900;
    letter-spacing: 1.5px;
    font-size: clamp(1.25rem, 2.5vw, 1rem);
    transition: color 0.3s ease;
}

.navbar-logo img {
    height: 40px;
    /* adjust size to fit navbar */
    width: auto;
    border-radius: 6px;
    /* optional smooth edges */
    object-fit: contain;
}

.navbar-logo:hover {
    color: white;
    /* hover color */
    text-decoration: none;
}

.navbar-logo:hover img {
    transform: scale(1.05);
    /* optional hover zoom */
    transition: transform 0.3s ease;
}


@media (max-width: 480px) {
    .menu-toggle {
        padding-right: 5px;
    }

    .navbar {
        padding: 0.1rem;
        min-height: 50px;
    }

    .navbar-logo {
        padding-left: 5px;
        font-size: clamp(1.5rem, 2.5vw, 1.8rem);
        min-width: 100px;
        font-size: 1.2rem;
    }

    .navbar-links {
        width: 80vw;
        max-width: 240px;
    }


    .navbar-search {
        display: flex;
        justify-content: flex-end;
        align-items: end;
    }

    .navbar-search input {
        width: auto;
        max-width: 140px;
        margin-right: 5px;
    }

    .navbar-links li a,
    .logout-btn,
    .create-job-btn {
        font-size: 1rem;
    }

    .logout-btn {
        color: red;
        font-weight: bold;
    }
}

/* Footer Styles */
.footer {
    background-color: #f8f9fa;
    /* Light gray background */
    color: #6c757d;
    /* Softer text color */
    padding: 4rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e9ecef;
    /* Light border */
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    /* Using grid for layout */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #343a40;
    /* Darker logo color */
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #343a40;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-social a:hover,
.footer-links a:hover {
    color: var(--primary-color);
    /* Blue hover color */
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    color: #6c757d;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}


.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

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



/* Divider */
.divider {
    height: 2px;
    width: 100%;
    background-color: #ccc;
    margin: clamp(1rem, 2vw, 1.5rem) 0;
    border-radius: 1px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(6px, 1vw, 8px);
    margin: clamp(1rem, 2vw, 1.5rem) auto;
    padding: 0 0.5rem;
}

.pagination button,
.page-number {
    padding: clamp(8px, 1.5vw, 10px) clamp(14px, 2vw, 16px);
    margin: clamp(4px, 1vw, 5px);
    border: none;
    background: var(--primary-color);
    color: var(--bg-color);
    font-weight: 600;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
    /* Improve touch interaction */
}

.pagination button:hover,
.page-number:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination button:disabled {
    background: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
    box-shadow: none;
}

.page-number.active {
    background: var(--bg-color);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: inset 0 0 0 2px #4ec75b;
}

/* Button Styles */
.edit-btn,
.delete-btn {
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2vw, 12px);
    margin: 0 clamp(4px, 1vw, 5px);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    transition: background-color 0.3s ease;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    touch-action: manipulation;
    /* Improve touch interaction */
}

.edit-btn {
    background-color: var(--secondary-color);
}

.edit-btn:hover {
    background-color: var(--secondary-color-dark);
    /* Assuming a darker variant */
}

.delete-btn {
    background-color: var(--redAlert-color);
}

.delete-btn:hover {
    background-color: var(--redAlert-color-dark);
    /* Assuming a darker variant */
}

/* Additional Breakpoint for Larger Screens */
@media (min-width: 1440px) {
    .navbar-logo {
        font-size: clamp(1.8rem, 2.5vw, 2rem);
    }

    .navbar-links {
        gap: clamp(1rem, 2vw, 1.5rem);
    }

    .navbar-search input,
    .navbar-search button {
        font-size: clamp(0.95rem, 1.5vw, 1rem);
        max-width: 250px;
    }

    .footer-container {
        max-width: 1400px;
    }

    .footer-logo {
        font-size: clamp(1.8rem, 2.5vw, 2rem);
    }

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


/* Popup overlay */
.share-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    text-align: center;
    width: 300px;
    animation: popupFade 0.3s ease;
}

/* Popup message */
.share-popup p {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Social buttons */
.share-popup .social-btn {
    margin: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    color: #fff;
    transition: transform 0.1s ease;
}

.share-popup .social-btn:hover {
    transform: scale(1.05);
}

/* Social platform colors */
.share-popup .facebook {
    background: #3b5998;
}

.share-popup .twitter {
    background: #1da1f2;
}

.share-popup .whatsapp {
    background: #25d366;
}

.share-popup .linkedin {
    background: #0077b5;
}

/* Close button */
.share-popup .close-btn {
    display: block;
    margin: 15px auto 0;
    padding: 6px 12px;
    background: #888;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    border: none;
}

.share-popup .close-btn:hover {
    background: #555;
}

/* Popup animation */
@keyframes popupFade {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

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