/**
 * Copyright © ToweringMedia. All rights reserved.
 * See LICENSE.txt for license details.
 */

/* Remove margin-bottom from nav-sections when hero banner is present */
.page-layout-2columns-left .nav-sections,
.page-layout-2columns-right .nav-sections,
.page-layout-1column .nav-sections {
    margin-bottom: 0 !important;
}

/* Ensure hero banner sits flush with navigation */
.page-top .tm-category-hero {
    margin-top: 0 !important;
}

.tm-category-hero {
    position: relative;
    width: 100vw;
    min-height: 260px;
    background-size: cover;
    background-position: center 0;
    background-repeat: no-repeat;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 0;
    margin-bottom: 20px;
    left: 0;
    right: 0;
    overflow: hidden;
}

.tm-category-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tm-category-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    width: 100%;
    padding: 20px;
    color: #ffffff;
    text-align: center;
}

.tm-category-hero__inner--left {
    text-align: left;
}

.tm-category-hero__inner--center {
    text-align: center;
}

.tm-category-hero__title {
    margin: 0 0 15px 0;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tm-category-hero__desc {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    max-width: 800px;
}

.tm-category-hero__inner--left .tm-category-hero__desc {
    margin-left: 0;
}

.tm-category-hero__inner--center .tm-category-hero__desc {
    margin-left: auto;
    margin-right: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tm-category-hero {
        min-height: 180px;
    }

    .tm-category-hero__title {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }

    .tm-category-hero__desc {
        font-size: 1rem;
    }

    .tm-category-hero__inner {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .tm-category-hero {
        min-height: 150px;
    }

    .tm-category-hero__title {
        font-size: 1.5rem;
    }

    .tm-category-hero__desc {
        font-size: 0.9375rem;
    }
}
