/*
Theme Name: RemotesJob
Theme URI: https://remotesjob.com
Author: RemotesJob & ChatGPT
Author URI: https://remotesjob.com
Description: Lightweight remote job board theme inspired by Remotive, optimised for Core Web Vitals, AMP compatibility and PHP 8.3.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: remotesjob
Tags: job-board, remote-jobs, blog, two-columns, custom-logo, custom-menu, custom-background, amp, responsive-layout
*/

/* Base reset & typography */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #2c2018;
    background-color: #fdf4ea;
}

a {
    color: #b24117;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

.site-header,
.site-footer {
    background: #f7e0c9;
    color: #2c2018;
}

.site-header-inner,
.site-footer-inner,
.content-area-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}

/* Header */
.site-branding {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.site-title {
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0;
}

.site-description {
    margin: 0;
    font-size: .9rem;
    color: #6b4a33;
}

/* Navigation */
.primary-nav-toggle {
    display: none;
    background: #5b2c1b;
    color: #fff;
    border-radius: .75rem;
    width: 3rem;
    height: 3rem;
    border: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.primary-nav-toggle span,
.primary-nav-toggle span::before,
.primary-nav-toggle span::after {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: #fff;
    border-radius: 999px;
    position: relative;
}

.primary-nav-toggle span::before,
.primary-nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
}

.primary-nav-toggle span::before {
    top: -.4rem;
}

.primary-nav-toggle span::after {
    top: .4rem;
}

.primary-navigation {
    margin-left: auto;
}

.primary-navigation ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.primary-navigation a {
    font-weight: 600;
    padding: .5rem .75rem;
    border-radius: 999px;
}

.primary-navigation a:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 2px;
}

/* Hero / search */
.hero {
    background: #fdf4ea;
    padding: 2.5rem 1.25rem 2rem;
}

.hero-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 1.8rem;
    margin: 0 0 .5rem;
}

.hero-subtitle {
    margin: 0 0 1.5rem;
    color: #6b4a33;
}

.hero-search-form {
    background: #fff;
    border-radius: 999px;
    padding: .5rem 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,.03);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.hero-search-form input[type="search"] {
    flex: 1;
    border: 0;
    padding: .65rem .75rem;
    font-size: .95rem;
    border-radius: 999px;
    outline: none;
}

.hero-search-form button[type="submit"] {
    border-radius: 999px;
    border: 0;
    padding: .65rem 1.25rem;
    background: #ff8a00;
    color: #2c2018;
    font-weight: 700;
    cursor: pointer;
}

/* Category pills */
.category-pills {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
}

.category-pill {
    padding: .4rem .9rem;
    border-radius: 999px;
    background: #f3e3d1;
    font-size: .85rem;
}

/* Content layout */
.content-area-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    padding-bottom: 2.5rem;
}

.filters-panel {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.03);
}

.filters-panel h2 {
    margin-top: 0;
    font-size: 1rem;
}

.filters-panel fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 1rem;
}

.filters-panel legend {
    font-weight: 600;
    margin-bottom: .25rem;
    font-size: .9rem;
}

.filters-panel label {
    display: block;
    font-size: .85rem;
    margin-bottom: .25rem;
}

.job-results-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.job-results-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

/* Job cards */
.job-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.job-card {
    background: #ffe9c7;
    border-radius: 1.25rem;
    padding: 1rem 1rem;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: .75rem;
}

.job-card-header {
    grid-column: 1 / -1;
}

.job-card-title {
    font-size: 1rem;
    margin: 0 0 .25rem;
}

.job-card-company {
    margin: 0 0 .5rem;
    color: #5f4633;
    font-size: .9rem;
}

.job-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.job-tag {
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    background: #fdf4ea;
}

.job-card-meta {
    margin-top: .75rem;
    font-size: .8rem;
    color: #6b4a33;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: space-between;
}

.job-card-meta-right {
    margin-left: auto;
}

.job-card .job-cta {
    border-radius: 999px;
    border: 0;
    background: #ff8a00;
    padding: .55rem .95rem;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    color: #2c2018;
}

/* Footer */
.site-footer {
    margin-top: auto;
}

.site-footer-inner {
    padding-top: 2rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
}

.footer-widgets h2 {
    margin-top: 0;
    font-size: 1rem;
}

.site-info {
    border-top: 1px solid #f0d3b3;
    padding-top: 1rem;
    font-size: .8rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: space-between;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
    }

    .primary-nav-toggle {
        display: inline-flex;
    }

    .primary-navigation {
        position: fixed;
        inset-inline: 0;
        top: 3.75rem;
        background: #f7e0c9;
        padding: 1rem 1.25rem 1.5rem;
        transform: translateY(-120%);
        transition: transform .2s ease-out;
        z-index: 9999;
    }

    .primary-navigation.is-open {
        transform: translateY(0);
    }

    .primary-navigation ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-area-inner {
        grid-template-columns: minmax(0,1fr);
    }
}

@media (min-width: 900px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .content-area-inner {
        grid-template-columns: 280px minmax(0,1fr);
    }
}
