/*
Theme Name:        Flexa
Description:       A minimal block starter theme. Flexa gives you a clean foundation - white, black, and one accent color - so you can build without clearing away what someone else put there first.
Version:           1.1.1
Author:            flexatech
Author URI:        https://profiles.wordpress.org/flexatech/
Tags:              blog, one-column, block-patterns, full-site-editing, block-styles, editor-style, style-variations, custom-colors, featured-images, translation-ready
Text Domain:       flexa
Domain Path:       /languages
Requires at least: 6.5
Tested up to:      7.0
Requires PHP:      7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

This theme, like WordPress, is licensed under the GPL.
*/


/* ============================================================
   CSS Reset
   Modern, minimal reset as a foundation.
============================================================ */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100svh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

button {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}


/* ============================================================
   Layout: Sticky Footer
============================================================ */

.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

.site-main {
    flex: 1;
}

.site-header,
.site-main,
.site-footer {
    padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--m);
}

@media (max-width: 781px) {
    .site-header .wp-block-navigation__responsive-container.is-menu-open {
        padding: var(--wp--preset--spacing--m);
    }

    .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
        padding-inline: var(--wp--preset--spacing--s);
    }
}

.site-header .wp-block-navigation .wp-block-navigation-item__content {
    white-space: nowrap;
}


/* ============================================================
   Header Top Bar
============================================================ */

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--wp--preset--color--subtle);
    padding-bottom: var(--wp--preset--spacing--xs);
    margin-bottom: var(--wp--preset--spacing--s);
}

.header-top-bar p {
    margin: 0;
}

.header-top-bar .wp-block-social-links {
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

.header-top-bar .wp-block-social-links a {
    color: var(--wp--preset--color--contrast) !important;
    background: none !important;
}

.header-top-bar .wp-block-social-links svg {
    fill: currentColor !important;
}


/* ============================================================
   Post list
============================================================ */

.main-content {
    padding-top: var(--wp--preset--spacing--xl);
    padding-bottom: var(--wp--preset--spacing--xl);
}

.post-item {
    border-bottom: 1px solid var(--wp--preset--color--subtle);
    padding-bottom: var(--wp--preset--spacing--l);
    margin-bottom: var(--wp--preset--spacing--l);
}

.post-meta {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--muted);
}


/* ============================================================
   Category badge
============================================================ */

.wp-block-post-terms a {
    display: inline-block;
    background-color: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--base);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2em 0.6em;
    text-decoration: none;
    border-radius: 100px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.wp-block-post-terms a:hover {
    background-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
}


/* ============================================================
   Card (archive)
============================================================ */

.post-card {
    border: 1px solid var(--wp--preset--color--subtle);
    border-radius: 6px;
    overflow: hidden;
}

.post-card .wp-block-post-featured-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.post-card .wp-block-post-featured-image a {
    display: block;
    height: 100%;
}

.post-card .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.post-card__body {
    padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--m) var(--wp--preset--spacing--m);
}

.post-card .wp-block-post-featured-image:not(:has(img)) {
    background-color: var(--wp--preset--color--subtle);
    background-image: none;
}

.post-card .wp-block-post-featured-image:not(:has(img)) a,
.post-card .wp-block-post-featured-image:not(:has(img)) svg {
    display: none;
}


/* ============================================================
   Accessibility: Reduced Motion
============================================================ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}