/* 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: sticky;
    top: 0;
    background-color: var(--primary-color);
    padding: clamp(0.5rem, 2vw, 0.75rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.navbar-links {
    list-style: none;
    display: flex;
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    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 10px;
    border-radius: 4px;
    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;
}

.logout-btn:hover,
.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;
}

.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: rgba(92, 92, 92, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.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: center;
        font-size: 1.1rem;
        padding: 0.8rem 0;
    }

    .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;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
    }

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

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

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

/* Footer Styles */
.footer {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: clamp(1.5rem, 3vw, 2rem) 0;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: clamp(1.5rem, 2.5vw, 2rem);
    padding: 0 clamp(0.75rem, 2vw, 1rem);
}

.footer-logo {
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 1px;
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

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

.footer-title {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    font-weight: bold;
}

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

.footer-links a {
    color: var(--text-color-light);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #000000;
    font-size: 1.01rem;
}

.app-link {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #868383;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    margin: 0.2rem 0;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.app-link:hover {
    background: #e0e0e0;
}

.footer-contact p {
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    margin: 0.3rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-contact img {
    filter: brightness(0) invert(1);
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.footer-social img {
    width: clamp(22px, 4vw, 26px);
    height: clamp(22px, 4vw, 26px);
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.footer-social img:hover {
    transform: scale(1.2);
}

.footer-bottom {
    margin-top: 1.5rem;
    border-top: 1px solid #ccc;
    padding-top: 1rem;
}

.footer-stats {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin: 1rem 0;
    flex-wrap: wrap;
}

.footer-stats span {
    font-weight: 600;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer-container {
        max-width: 900px;
        gap: clamp(1rem, 2vw, 1.5rem);
    }

    .footer-logo {
        font-size: clamp(1.4rem, 2.2vw, 1.6rem);
    }

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

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 1rem;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: clamp(1rem, 2.5vw, 1.25rem) 0.5rem;
    }

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

    .footer-title {
        font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    }

    .footer-contact p {
        font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    }

    .footer-stats {
        gap: 0.75rem;
    }

    .footer-stats span {
        font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    }
}

/* Footer Slide-Up Animation */
@keyframes slideUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.footer.animate-slide-up {
    animation: slideUp 0.7s ease-out forwards;
}

/* 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;
    }
}