:root {
    --mcd-yellow: #FFC72C;
    --mcd-red: #DA291C;
    --mcd-black: #292929;
    --mcd-grey: #f2f2f2;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for sticky header */
}

body {
    font-family: 'Speedee', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--mcd-black);
    background-color: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
    background-color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 2rem;
}



.logo-container {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: auto;
}

.mcd-logo-img {
    height: 40px;
    width: auto;
    transform: rotate(180deg) !important;
    display: inline-block;
}

nav {
    margin-left: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: var(--mcd-black);
    font-weight: 500;
    display: inline-block;
    transition: color 0.2s;
}

.nav-btn {
    padding: 8px 16px;
    background-color: var(--mcd-black);
    color: white !important;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-btn:hover {
    background-color: #444;
}

.dex-btn {
    background-color: var(--mcd-red);
}

.dex-btn:hover {
    background-color: #b01b1b;
}

.ca-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f2f2f2;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #ddd;
}

.copy-btn {
    background: var(--mcd-yellow);
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
}

.copy-btn:hover {
    background: #e0ac00;
}

/* Hero */
.hero {
    position: relative;
    background-color: var(--mcd-grey);
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
    /* Ensure the hero has height to show images if content is small */
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-track {
    display: flex;
    height: 100%;
    width: max-content;
    /* Use translate3d for hardware acceleration */
    animation: scroll 40s linear infinite;
    will-change: transform;
}

.carousel-track img {
    height: 100%;
    width: auto;
    object-fit: cover;
    max-width: none;
    /* Ensure no gaps */
    display: block;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

@keyframes scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Add a card look for readability */
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 90%;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--mcd-black);
}

.hero span {
    color: var(--mcd-yellow);
}

/* Job Search */
.search-container {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-btn {
    background-color: var(--mcd-yellow);
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background-color: #ffbc0d;
}

/* Job Listings */
.jobs-section {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.job-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.job-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--mcd-black);
}

.job-location {
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.apply-btn {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background-color: var(--mcd-yellow);
    color: black;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.apply-btn:hover {
    background-color: #ffbc0d;
}

/* Footer */
footer {
    background-color: #1f1f1f;
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Mobile Responsiveness */

/* Large Tablets and Small Desktops (769px - 1024px) */
@media (max-width: 1024px) {
    .job-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .jobs-section {
        padding: 0 1.5rem;
    }
}

/* Tablets (481px - 768px) */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 120px;
    }

    /* Header */
    header {
        flex-direction: column;
        gap: 15px;
        padding: 1rem;
        position: sticky;
        top: 0;
    }

    .logo-container {
        width: 100%;
        justify-content: center;
        font-size: 1.1rem;
        gap: 5px;
        margin-right: 0;
    }

    header {
        gap: 1rem;
    }

    .mcd-logo-img {
        height: 35px;
    }

    nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    nav ul {
        width: max-content;
        padding: 0;
        gap: 12px;
        min-width: 100%;
        justify-content: flex-start;
    }

    nav a {
        font-size: 0.9rem;
    }

    .nav-btn,
    .ca-box {
        font-size: 0.75rem;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .ca-box {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .ca-box span {
        font-size: 0.65rem;
        word-break: break-all;
        max-width: 120px;
    }

    .copy-btn {
        font-size: 0.7rem;
        padding: 3px 6px;
    }

    /* Hero */
    .hero {
        padding: 2rem 1rem;
        min-height: 350px;
    }

    .carousel-track {
        animation-duration: 30s;
    }

    .carousel-track img {
        min-width: 200px;
    }

    .hero-content {
        padding: 1.5rem;
        width: 95%;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.95rem;
    }

    /* Search */
    .search-container {
        flex-direction: column;
        margin: 1rem 0;
        padding: 15px;
        gap: 10px;
    }

    .search-container input {
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
    }

    .search-btn {
        width: 100%;
        padding: 12px;
    }

    /* Job Grid */
    .jobs-section {
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .job-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .job-card {
        padding: 18px;
    }

    .job-title {
        font-size: 1.15rem;
    }

    .job-location {
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
        flex-wrap: wrap;
    }

    .footer-links a {
        font-size: 0.85rem;
    }
}

/* Small Phones (320px - 480px) */
@media (max-width: 480px) {
    html {
        scroll-padding-top: 140px;
    }

    /* Header */
    header {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .logo-container {
        font-size: 1rem;
        gap: 4px;
        margin-right: 0;
    }

    .mcd-logo-img {
        height: 30px;
    }

    nav ul {
        gap: 8px;
        font-size: 0.85rem;
    }

    nav a {
        font-size: 0.8rem;
    }

    .nav-btn {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .ca-box {
        font-size: 0.65rem;
        padding: 4px 8px;
        flex-wrap: wrap;
        max-width: 100%;
    }

    .ca-box span {
        font-size: 0.6rem;
        max-width: 100px;
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .copy-btn {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    /* Hero */
    .hero {
        padding: 1.5rem 0.75rem;
        min-height: 300px;
    }

    .carousel-track {
        animation-duration: 25s;
    }

    .carousel-track img {
        min-width: 150px;
    }

    .hero-content {
        padding: 1.25rem;
        width: 98%;
    }

    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    /* Search */
    .search-container {
        padding: 12px;
        margin: 0.75rem 0;
    }

    .search-container input {
        padding: 10px;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 10px;
        font-size: 0.9rem;
    }

    /* Job Sections */
    .jobs-section {
        padding: 0 0.75rem;
        margin: 1.5rem auto;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .job-grid {
        gap: 12px;
    }

    .job-card {
        padding: 15px;
    }

    .job-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .job-location {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .job-card p {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .apply-btn {
        padding: 10px;
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0.75rem;
    }

    .footer-links {
        gap: 10px;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    footer p {
        font-size: 0.85rem;
    }
}

/* Extra Small Phones (max-width: 320px) */
@media (max-width: 320px) {
    .hero h1 {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .ca-box span {
        max-width: 80px;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 250px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
    .apply-btn,
    .search-btn,
    .copy-btn,
    .nav-btn {
        min-height: 44px;
        min-width: 44px;
    }

    nav a {
        padding: 8px 4px;
    }
}