/* The WordPress block styles the generated demo pages lean on, for a site that has no WordPress.

   theme.css is the WordPress theme's stylesheet, copied byte for byte, and it styles the front page's bands
   on top of what WordPress core's block library draws: the cover that lays the photo under the headline, the
   group, the buttons, and the flex rows core adds through its layout classes. The Joomla copy of a page
   keeps the block markup (the generator converts shortcodes and posts, not the blocks), so without these
   rules the hero photo is an inline picture above its headline and every band head stacks. Only the blocks
   the dataset uses are here (data/site-joomla/posts.json); the loaded order is this file, then theme.css. */

.wp-block-group { box-sizing: border-box; }
.has-text-align-center { text-align: center; }

/* core/cover */
.wp-block-cover {
    position: relative;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    min-height: 430px;
    padding: 1em;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-position: 50%;
    background-size: cover;
    color: #fff;
}
.wp-block-cover.has-custom-content-position.is-position-bottom-center { align-items: flex-end; justify-content: center; }
.wp-block-cover__background { position: absolute; inset: 0; z-index: 1; opacity: .5; }
.wp-block-cover__background.has-background-dim-40 { opacity: .4; }
.wp-block-cover__image-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}
.wp-block-cover__inner-container { position: relative; z-index: 1; width: 100%; }

/* core/buttons */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: .5em; }
.wp-block-button__link {
    display: inline-block;
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    word-break: break-word;
}

/* The rows core's layout classes make flex in WordPress (is-layout-flex, justified between or centred). */
.fwre-theme-band-head,
.fwre-home-alerts-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.fwre-home-cta-actions { justify-content: center; }
/* The call to action's lead is one line wide on WordPress: the group's content width (1240 px) comes through
   core's layout rule after theme.css, and the 640 px of theme.css never applies there. */
.fwre-home-cta .fwre-home-cta-lead { max-width: 1240px; }

/* The home page's "From our blog" band is Joomla's articles module (mod_articles) where WordPress has the
   latest-posts block. The same three cards theme.css draws for the block: the photo first, then the linked
   title, the date and the excerpt, in a grid that goes 3, 2 and 1 wide. The module prints the title first and
   the photo after the date, so each card is a column that puts the photo on top; the "Details" label core
   adds for screen readers and the calendar icon are not part of the WordPress card. */
.fwre-home-posts .mod-articles-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fwre-space-20, 20px); margin: 0; padding: 0; list-style: none; }
.fwre-home-posts .mod-articles-items > li {
    display: flex;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--fwre-color-border, #e5e5e5);
    border-radius: var(--fwre-radius-card, 8px);
    background: var(--fwre-color-surface, #fff);
}
.fwre-home-posts .mod-articles-item,
.fwre-home-posts .mod-articles-item-content { display: flex; flex: 1 1 auto; flex-direction: column; }
.fwre-home-posts .mod-articles-item-content { padding: 0 0 var(--fwre-space-20, 20px); }
.fwre-home-posts .mod-articles-image { order: -2; margin: 0 0 var(--fwre-space-16, 16px); }
.fwre-home-posts .mod-articles-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.fwre-home-posts .mod-articles-title { order: -1; margin: 0 var(--fwre-space-20, 20px); font-size: var(--fwre-text-xl, 18px); font-weight: var(--fwre-weight-semibold, 600); line-height: 1.35; }
.fwre-home-posts .mod-articles-title a { color: var(--fwre-color-text, #323232); text-decoration: none; }
.fwre-home-posts .mod-articles-title a:hover { color: var(--fwre-color-primary, #0CAB9B); }
.fwre-home-posts .mod-articles-item-content > dl { order: -1; margin: var(--fwre-space-6, 6px) var(--fwre-space-20, 20px) 0; padding: 0; color: var(--fwre-color-text-muted, #5A5A5A); font-size: var(--fwre-text-sm, 13px); }
.fwre-home-posts .mod-articles-item-content > dl dd { margin: 0; }
.fwre-home-posts .article-info-term,
.fwre-home-posts .mod-articles-date .icon-calendar { display: none; }
.fwre-home-posts .mod-articles-item-content > p,
.fwre-home-posts .mod-articles-item-content > .mod-articles-readmore { margin: var(--fwre-space-10, 10px) var(--fwre-space-20, 20px) 0; color: var(--fwre-color-text-muted, #5A5A5A); font-size: var(--fwre-text-md, 14px); line-height: 1.6; }
.fwre-home-posts .mod-articles-item-content > p a { color: var(--fwre-color-primary, #0CAB9B); }
/* "Read more" is a plain link under the excerpt, as WordPress ends its excerpt with one. */
.fwre-home-posts .mod-articles-item-content > p.readmore { margin: var(--fwre-space-6, 6px) var(--fwre-space-20, 20px) 0; font-size: var(--fwre-text-md, 14px); }
.fwre-home-posts .readmore .btn { padding: 0; border: 0; background: none; color: var(--fwre-color-primary, #0CAB9B); font: inherit; }
.fwre-home-posts .readmore .icon-chevron-right { display: none; }
@media (max-width: 959px) {
    .fwre-home-posts .mod-articles-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    .fwre-home-posts .mod-articles-items { grid-template-columns: minmax(0, 1fr); }
}

/* The contact page lists the agents with the Agent module where WordPress prints the agents list. The module's
   card is 300 px wide on its own (a single "Your agent" box); here its row of four takes the page's width. */
.fwre-theme-product .fwre-theme-entry-content > .moduletable > #fwre.fwre-mod-agent-card { max-width: none; }

/* A blog post's previous and next links: Joomla's own article navigation, drawn where WordPress puts its post
   navigation and with the theme's own pill (.page-numbers) look. */
.fwre-theme-post-nav { margin-top: var(--fwre-space-30, 30px); }
.fwre-theme-post-nav .pagenavigation .pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin: 0; padding: 0; }
.fwre-theme-post-nav .pagenavigation .btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--fwre-radius, 4px);
    background: var(--fwre-grey-light, #F3F3F3);
    color: inherit;
    text-decoration: none;
}
.fwre-theme-post-nav .pagenavigation .btn:hover { background: var(--fwre-green, #0CAB9B); color: #fff; }
.fwre-theme-post-nav .pagenavigation [class^="icon-"] { display: none; }
/* Joomla keeps the neighbour's title for screen readers behind its own "visually-hidden" class, which this template
   doesn't load, and draws a bare "Prev" or "Next" for the eye. WordPress shows the title, so show it and drop the label. */
.fwre-theme-post-nav .pagenavigation a > span[aria-hidden="true"] { display: none; }
.fwre-theme-post-nav .pagenavigation .next { margin-left: auto; }
