/**
 * Trillium Salon - main content and sidebar.
 *
 * The blog markup comes from the template's own com_content overrides, which
 * wrap each item as:
 *
 *   .blog-item > .blogItemWrap
 *     .blogItemImage   -> intro image with the title laid over its foot
 *     .item-content    -> intro text
 */

/* ------------------------------------------------------------- blog grid */

/**
 * Cassiopeia renders masonry-N with CSS columns; the old design used a plain
 * three-column grid, so rows line up instead of flowing.
 */
.blog-items.masonry-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.blog-items.masonry-3 .blog-item {
    display: block;
    margin-bottom: 0;
}

/* ------------------------------------------------------------- blog item */

.blogItemImage {
    position: relative;
}

/* Cassiopeia floats the intro image; here it fills the column */
.blogItemImage .item-image {
    float: none;
    margin: 3px 0 15px;
}

.blogItemImage img {
    display: block;
    width: 100%;
    height: auto;
}

.blogItemImage .page-header {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 0 7px 5px;
    background-color: #fff;
    border: 0;
}

.blogItemImage .page-header h2 {
    margin: 0;
    font-size: 1.9rem;
}

.blogItemWrap .item-content {
    line-height: 1.5;
}

/* ---------------------------------------------------------- content links */

/**
 * Body copy links carry the double rule underline, with the rule turning
 * accent on hover. Buttons and menu links opt out.
 */
.container-component a:not(.btn),
.container-sidebar-right a:not(.btn),
.container-sidebar-left a:not(.btn) {
    text-decoration: underline;
    text-decoration-style: double;
    text-decoration-color: rgb(0 0 0 / 30%);
    text-underline-offset: 3px;
}

.container-component a:not(.btn):hover,
.container-component a:not(.btn):focus,
.container-sidebar-right a:not(.btn):hover,
.container-sidebar-right a:not(.btn):focus,
.container-sidebar-left a:not(.btn):hover,
.container-sidebar-left a:not(.btn):focus {
    text-decoration-color: var(--link-hover-color);
}

/* ---------------------------------------------------------------- sidebar */

.container-sidebar-right,
.container-sidebar-left {
    flex-direction: column;
}

.container-sidebar-right .moduletable + .moduletable,
.container-sidebar-left .moduletable + .moduletable {
    margin-top: 2rem;
}

.container-sidebar-right h3,
.container-sidebar-left h3 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
}

/* the arrow rule sits full width above and below the list */
.hoursList .arrowRight img {
    display: block;
    width: 100%;
    height: auto;
}

.businessHours {
    max-width: 420px;
    margin-block:1rem;
    padding: 0;
    list-style: none;
}

.businessHours li {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.listHead {
    font-family: "Abril Fatface", Georgia, serif;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 1px;
}

/* ------------------------------------------------------------ breakpoints */

/**
 * Between tablet and small desktop the sidebar is too narrow for two columns,
 * so each entry stacks and the Day/Hours heading row is dropped.
 */
@media (min-width: 768px) and (max-width: 1200px) {
    .businessHours li {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }

    .businessHours li:first-child {
        display: none;
    }

    .businessHours .listHead {
        display: none;
    }

    .businessHours .day {
        font-weight: 600;
    }
}

@media (max-width: 1000px) {
    .blog-items.masonry-3 {
        display: block;
        column-count: 2;
        column-gap: 1.5rem;
    }

    .blog-items.masonry-3 .blog-item {
        display: inline-block;
        width: 100%;
        margin-bottom: 1.5rem;
        break-inside: avoid;
    }
}

@media (max-width: 500px) {
    .blog-items.masonry-3 {
        column-count: 1;
    }
}
