/*
Theme Name:        Mayslist
Theme URI:         https://yoursite.com/mayslist-theme
Author:            Your Name
Author URI:        https://yoursite.com
Description:       A clean, responsive WordPress theme designed to work with the Mayslist Classifieds plugin. Optimized for classified ad listings with a Craigslist-inspired layout.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.5
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       mayslist-theme
Tags:              classifieds, listings, two-columns, custom-menu, featured-images, translation-ready
*/

/* ═══════════════════════════════════════════════════
   Mayslist Theme — Base Styles
   ═══════════════════════════════════════════════════ */

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

:root {
    --color-primary:    #2c6fa8;
    --color-primary-dk: #1a4f7a;
    --color-accent:     #e8734a;
    --color-text:       #1d2327;
    --color-muted:      #646970;
    --color-border:     #dde3ea;
    --color-bg:         #f6f7f7;
    --color-card:       #ffffff;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, monospace;
    --radius: 6px;
    --max-width: 1140px;
    --header-height: 60px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dk); }

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

/* ── Layout ─────────────────────────────────────── */
.site-container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ── Header ─────────────────────────────────────── */
.site-header {
    background: var(--color-primary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.site-header .inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.site-branding a { color: #fff; text-decoration: none; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.site-branding .tagline { font-size: .75rem; opacity: .75; display: block; }

/* Nav */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav a {
    color: rgba(255,255,255,.88);
    text-decoration: none;
    font-size: .88rem;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: .15s;
}
.site-nav a:hover, .site-nav .current-menu-item a { background: rgba(255,255,255,.15); color: #fff; }

/* Header CTA */
.header-cta a {
    background: #fff;
    color: var(--color-primary);
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: .15s;
}
.header-cta a:hover { background: var(--color-accent); color: #fff; }

/* Mobile hamburger */
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* ── Main content ───────────────────────────────── */
.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px;
    min-height: calc(100vh - var(--header-height) - 200px);
}

/* ── Footer ─────────────────────────────────────── */
.site-footer {
    background: #1a2332;
    color: rgba(255,255,255,.75);
    margin-top: 60px;
    padding: 40px 20px 20px;
    font-size: .88rem;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 { color: #fff; margin: 0 0 12px; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: var(--max-width); margin: 0 auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ── Typography ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { line-height: 1.3; margin: 0 0 .75em; font-weight: 700; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

/* ── WordPress page content ─────────────────────── */
.entry-content {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.entry-title { font-size: 1.5rem; margin-bottom: 20px; }

/* ── WP pagination ──────────────────────────────── */
.page-numbers { display: inline-block; padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 4px; margin: 2px; text-decoration: none; font-size: .88rem; }
.page-numbers.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── Widgets ─────────────────────────────────────── */
.widget { margin-bottom: 24px; }
.widget-title { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); margin-bottom: 10px; }

/* ── Forms ──────────────────────────────────────── */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .site-nav { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--color-primary-dk); padding: 12px 20px; }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; }
    .nav-toggle { display: block; }
    .header-cta { display: none; }
    h1 { font-size: 1.4rem; }
}
