/*
Theme Name: Pixl
Theme URI: https://wordpress.com/theme/pixl/
Author: Automattic
Author URI: https://automattic.com/
Description: Pixl is a simple yet opinionated blogging theme inspired by websites of the nineties.
Requires at least: 6.0
Tested up to: 6.0
Requires PHP: 5.7
Version: 1.0.8
License: GNU General Public License v2 or later
License URI: https://raw.githubusercontent.com/Automattic/themes/trunk/LICENSE
Template:
Text Domain: pixl
Tags: custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, one-column, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks, style-variations
*/

/* ============================================================
   1. ROOT VARIABLES
   ============================================================ */

:root {
    --wp--preset--color--primary: #000000;
    --wp--preset--color--foreground: #000000;
    --wp--preset--color--background: #7bdcb5;

    --wp--preset--spacing--20: 1rem;
    --wp--preset--spacing--30: 1.5rem;
    --wp--preset--spacing--40: 2rem;

    --wp--custom--shadow: 4px 4px 0 var(--wp--preset--color--primary);
}

/* ============================================================
   2. GLOBAL BASE STYLES
   ============================================================ */

body {
    background: var(--wp--preset--color--background);
}

html, body {
    font-family: "Courier New", Courier, "IBM Plex Mono", "Source Code Pro", monospace;
    font-size: 16px;
    line-height: 1.5;
    font-weight: normal;
}

a:where(:not(.wp-element-button)) {
    text-underline-offset: .3em;
}

.pixl-shadow {
    box-shadow: var(--wp--custom--shadow);
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title {
    font-family: "Courier New", Courier, "IBM Plex Mono", "Source Code Pro", monospace;
    font-weight: bold;
}

h1, .entry-title, .page-title {
    font-size: 1.75rem;
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 1rem; }

/* Site title fix */
.site-title,
.site-title a {
    font-family: "Courier New", Courier, "IBM Plex Mono", "Source Code Pro", monospace;
    font-weight: bold;
}

.content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 3rem; 
    padding-bottom: 3rem;
    text-align: left; /* keeps text left-aligned */
}


/* ============================================================
   4. FORMS
   ============================================================ */

:is(textarea, input:not([type="submit"])) {
    color: var(--wp--preset--color--foreground);
    background-color: var(--wp--preset--color--background);
    border: 2px solid var(--wp--preset--color--primary) !important;
    outline: none;
    font-size: 0.875rem;
    font-family: inherit;
}

:is(textarea, input:not([type="submit"]))::placeholder {
    color: var(--wp--preset--color--foreground);
    font-weight: 300;
}

input[type="checkbox"] {
    appearance: none;
    min-width: 0.75rem;
    height: 0.75rem;
    position: relative;
    margin-left: 0;
}

input[type="checkbox"]:checked::after {
    background-color: var(--wp--preset--color--foreground);
    content: "";
    position: absolute;
    width: 75%;
    height: 75%;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
}

/* ============================================================
   5. NAVIGATION & HEADER (CLEAN + CONSOLIDATED)
   ============================================================ */

/* Header */
.site-header {
    background: var(--wp--preset--color--background);
    padding: 0.25rem;
    border: 2px solid var(--wp--preset--color--primary);
    box-shadow: var(--wp--custom--shadow);
}

.site-header-inner {
    padding: 0.1rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.site-logo {
    height: 30px;
    width: auto;
    display: block;
    border: 2px solid var(--wp--preset--color--primary);
}

/* Navigation container */
.site-nav {
    position: relative;
}

/* Desktop menu */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: var(--wp--preset--spacing--30);
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu > li {
    text-align: center;
}

/* Main menu link base styling */
.nav-menu a {
    color: var(--wp--preset--color--foreground);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-radius: 4px;
}

/* Submenu parent label base styling */
.submenu-label {
    color: var(--wp--preset--color--foreground);
    padding: 0.5rem 0.75rem; /* matches main menu */
    border-radius: 4px;      /* matches main menu */
    display: inline-block;   /* ensures padding behaves like a link */
    cursor: default;         /* keeps it feeling like a label, not a link */
}


/* Main menu hover */
.nav-menu > li > a:hover,
.nav-menu > li > a:active {
    background: var(--wp--preset--color--foreground);
    color: var(--wp--preset--color--background);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Hover highlight for submenu parent label */
.has-submenu .submenu-label:hover {
    background: var(--wp--preset--color--foreground);
    color: var(--wp--preset--color--background);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

/* ============================
   SUBMENU (keep behavior, de-dupe only)
   ============================ */

/* Parent item: keep text + arrow inline */
.has-submenu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Arrow button (unstyled) */
.submenu-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.submenu-toggle:hover,
.submenu-toggle:focus {
    background: none;
    outline: none;
}

/* Dropdown menu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    border: 2px solid var(--wp--preset--color--primary);
    background: var(--wp--preset--color--background);
    list-style: none;
    padding: var(--wp--preset--spacing--20);
    margin: 0;
    z-index: 10;
    width: max-content;
}

/* Submenu links – merged both previous rules */
.submenu a {
    white-space: nowrap;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.submenu a:hover,
.submenu a:active {
    background: var(--wp--preset--color--foreground);
    color: var(--wp--preset--color--background);
}

/* Desktop hover behavior */
.has-submenu:hover > .submenu {
    display: block;
}

/* JS toggle support (keep exactly as you had it) */
.has-submenu:hover .submenu.open {
    display: block;
}



/* ============================
   MOBILE NAVIGATION (unified)
   ============================ */

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--wp--preset--color--primary);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

/* Mobile layout */
@media (max-width: 768px) {

    /* Show toggle button */
    .nav-toggle {
        display: block;
    }

    /* Mobile menu container */
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 1rem;
        background: var(--wp--preset--color--background);
        padding: 1rem;
        border: 2px solid var(--wp--preset--color--primary);
        position: absolute;
        top: 100%;
        right: 0;
        width: 220px;
        z-index: 20;
    }

    .nav-menu.open {
        display: flex;
    }

    /* Submenu parent stacks vertically */
    .has-submenu {
        display: block;
        align-items: flex-start;
    }

    /* Text + arrow stay inline */
    .has-submenu > a,
    .has-submenu > .submenu-toggle {
        display: inline-flex;
        align-items: center;
    }

    /* Submenu dropdown sits below parent */
    .submenu {
        position: static;
        border: none;
        padding-left: 1rem;
        margin-top: 0.5rem;
        display: none;
    }

    .submenu.open {
        display: block;
    }

    /* Disable desktop hover behavior on mobile */
    .has-submenu:hover .submenu {
        display: none;
    }
}


/* ============================================================
   6. COMPONENTS
   ============================================================ */

/* FILTERING */
/* Base dropdown styling */
select {
    font-family: inherit;   /* match your site’s font */
    font-size: 1.1rem;      /* slightly larger text */
    padding: 0.6rem 1rem;   /* comfortable click area */
    border: 2px solid black;
    border-radius: 8px;     /* rounded corners */
    background-color: #f7f7f7; /* subtle tint */
    box-shadow: 4px 4px 0px black;
    cursor: pointer;
    transition: all 0.2s ease-in-out; /* smooth hover */
}

/* Container to center the filters */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; /* stay on one row on desktop */
    gap: 1rem;
    margin: 2rem auto;
}

.filter-container select {
    flex: 1 1 auto;          /* shrink as needed */
    min-width: 120px;        /* prevents tiny unreadable boxes */
    max-width: 160px;        /* slightly smaller for better text fit */
    height: 40px;            /* consistent height */
    padding: 0.3rem 0.5rem;  /* tighter padding for more text room */
    line-height: 40px;
    border-radius: 8px;
    font-size: 0.7rem;       /* Option 5: smaller, cleaner text */
}

/* Mobile adjustments */
@media (max-width: 500px) {
    .filter-container {
        flex-wrap: wrap; /* allow wrapping only on small screens */
    }

    .filter-container select {
        flex: 1 1 45%;   /* two per row */
        max-width: none;
        font-size: 0.75rem;  /* slightly smaller for mobile */
        padding: 0.25rem 0.4rem;
    }
}


/* Hover effect */
select:hover {
    background-color: #eaeaea; /* slightly darker tint */
    box-shadow: 6px 6px 0px black;
    transform: translate(-2px, -2px); /* subtle lift */
}

/* Disabled dropdown styling */
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   RESULT CARD TEXT SIZE (Option 1)
   ============================================================ */

.region-card h3,
.dateposted-card h3,
.industry-card h3 {
    font-size: 0.9rem;   /* adjust smaller or larger as needed */
    margin: 4px 0;
}

.region-card h3 a,
.dateposted-card h3 a,
.industry-card h3 a {
    font-size: inherit;  /* ensures link matches the h3 size */
}


/* PHOTOS */
/* Space between menu and photo */
main {
    padding-top: 2rem; /* adjust if needed */
}

/* FOOTER */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
}

.site-footer .footer-inner {
    max-width: 800px;
    margin: 0 auto;
}

.wp-block-pullquote cite {
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 300;
    line-height: 1.6;
}

/* ============================================================
   7. PAGE/POST SPECIFIC
   ============================================================ */

/* HOME */   
/* Center the figure */
.home {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* Shadow border on the image */
.home img {
    border: 2px solid black;
    box-shadow: 6px 6px 0px black;
    max-width: 100%;
    width: 100%;          /* ensures consistent scaling */
    aspect-ratio: 16 / 9; /* choose your preferred ratio */
    object-fit: cover;    /* keeps images uniform without distortion */
    display: block;
    margin: 0 auto;       /* centers the image */
}


.home-heading {
    font-size: 1.75rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
}

/* ABOUT */   
/* Center the figure */
.about-photo {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* Shadow border on the image */
.about-photo img {
    border: 2px solid black;
    box-shadow: 6px 6px 0px black;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.about-heading {
    font-size: 1.75rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
}

/* ============================================================
   8. WORDPRESS LEGACY STYLES
   ============================================================ */

.wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__submenu-container {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.wp-block-navigation__responsive-container
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__submenu-container {
    background-color: var(--wp--preset--color--background);
    color: var(--wp--preset--color--foreground);
    border-color: var(--wp--preset--color--primary);
}

.wp-block-search :is(textarea, input:not([type="submit"])) {
    box-shadow: var(--wp--custom--shadow);
    margin-right: var(--wp--preset--spacing--20);
}

.wp-block-button.is-style-outline .wp-element-button:hover {
    background-color: var(--wp--preset--color--foreground);
    border-color: var(--wp--preset--color--foreground);
    color: var(--wp--preset--color--background);
}