/**
 * UFCLAS Featured Posts Styles
 * Adapted from the original featured-posts block styles (https://github.com/ufclas/ufl-block)
 */

.ufclas-featured-posts-wrapper {
    width: 100%;
}

.ufclas-featured-posts-wrapper .news-landing-header {
    width: 100%;
}

.ufclas-featured-posts-wrapper .news-hero-wrapper {
    min-height: calc(100vh - 365px);
    display: flex;
    align-items: stretch;
    align-content: stretch;
    width: 100%;
    flex-direction: column;
}

@media only screen and (min-width: 1055px) {
    .ufclas-featured-posts-wrapper .news-hero-wrapper {
        flex-direction: row;
    }
}

/* Main Featured Post Styles */
.ufclas-featured-posts-wrapper .news-hero-featured {
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    width: 100%;
    position: relative;
    overflow: hidden;
    padding-left: 5%;
    padding-right: 5%;
    padding-bottom: 30px;
    z-index: 99999;
    min-height: 300px;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
}

@media only screen and (min-width: 1055px) {
    .ufclas-featured-posts-wrapper .news-hero-featured {
        max-width: 66.66%;
    }
}

.ufclas-featured-posts-wrapper .featured-hero-link {
    display: flex;
    text-decoration: none;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
}

.ufclas-featured-posts-wrapper .featured-hero-link-inner {
    transition: all 0.2s ease-in-out;
    position: relative;
    z-index: 999999;
}

.ufclas-featured-posts-wrapper .news-hero-featured h1,
.ufclas-featured-posts-wrapper .news-hero-featured h2 {
    font-size: 48px;
    line-height: 40px;
    text-align: left;
    color: #fff;
    text-shadow: 0px 0px 12px rgba(0, 0, 0, 0.39);
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.ufclas-featured-posts-wrapper .news-hero-featured p {
    font-size: 24px;
    line-height: 30px;
    text-align: left;
    color: #fff;
    transition: all 0.3s ease-in-out;
    margin: 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(25px);
}

/* Gradient overlay for main featured post */
.ufclas-featured-posts-wrapper .news-hero-featured:before {
    content: "";
    height: 240px;
    background: linear-gradient(
        to top,
        #343741 0%,
        rgba(0, 17, 83, 0) 100%
    );
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    mix-blend-mode: multiply;
}

/* Blue overlay for hover effect */
.ufclas-featured-posts-wrapper .news-hero-featured:after {
    content: "";
    background-color: #0021a5;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(101%);
    transition: all 0.2s ease-in-out;
    z-index: 9999;
    mix-blend-mode: multiply;
}

/* Hover and focus states for main featured post */
.ufclas-featured-posts-wrapper .news-hero-featured:hover:after,
.ufclas-featured-posts-wrapper .news-hero-featured:focus:after,
.ufclas-featured-posts-wrapper .news-hero-featured:focus-within:after,
.ufclas-featured-posts-wrapper .news-hero-featured.hovered:after {
    transform: translateY(0%);
}

.ufclas-featured-posts-wrapper .news-hero-featured:hover .featured-hero-link-inner,
.ufclas-featured-posts-wrapper .news-hero-featured:focus .featured-hero-link-inner,
.ufclas-featured-posts-wrapper .news-hero-featured:focus-within .featured-hero-link-inner,
.ufclas-featured-posts-wrapper .news-hero-featured.hovered .featured-hero-link-inner {
    transform: translateY(0px);
}

.ufclas-featured-posts-wrapper .news-hero-featured:hover p,
.ufclas-featured-posts-wrapper .news-hero-featured:focus p,
.ufclas-featured-posts-wrapper .news-hero-featured:focus-within p,
.ufclas-featured-posts-wrapper .news-hero-featured.hovered p {
    visibility: visible;
    opacity: 1;
    transform: translateY(0%);
}

/* Supporting Posts Container */
.ufclas-featured-posts-wrapper .news-hero-supporting {
    display: flex;
    align-items: stretch;
    align-content: stretch;
    width: 100%;
    flex-direction: column;
}

@media only screen and (min-width: 1055px) {
    .ufclas-featured-posts-wrapper .news-hero-supporting {
        max-width: 33.33%;
        flex-direction: column;
    }
}

@media only screen and (max-width: 767px) {
    .ufclas-featured-posts-wrapper .news-hero-supporting {
        flex-direction: column;
    }
}

/* Supporting Posts Individual Styles */
.ufclas-featured-posts-wrapper .hero-link {
    display: flex;
    height: 100%;
    min-height: 240px;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    padding-left: 5%;
    padding-right: 5%;
    padding-bottom: 30px;
    flex: 1;
}

.ufclas-featured-posts-wrapper .hero-link-inner {
    transition: all 0.2s ease-in-out;
    transform: translateY(0);
    position: relative;
    z-index: 999999;
}

.ufclas-featured-posts-wrapper .hero-link h2 {
    font-size: 36px;
    line-height: 40px;
    text-align: left;
    color: #fff;
    text-shadow: 0px 0px 12px rgba(0, 0, 0, 0.39);
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.ufclas-featured-posts-wrapper .hero-link p {
    font-size: 24px;
    line-height: 30px;
    text-align: left;
    color: #fff;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    transform: translateY(25px);
    margin: 0;
}

/* Gradient overlay for supporting posts */
.ufclas-featured-posts-wrapper .hero-link:before {
    content: "";
    height: 240px;
    background: linear-gradient(
        to top,
        #343741 0%,
        rgba(0, 17, 83, 0) 100%
    );
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    mix-blend-mode: multiply;
}

/* Blue overlay for hover effect */
.ufclas-featured-posts-wrapper .hero-link:after {
    content: "";
    background-color: #0021a5;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(101%);
    transition: all 0.2s ease-in-out;
    z-index: 9999;
    mix-blend-mode: multiply;
}

/* Hover and focus states for supporting posts */
.ufclas-featured-posts-wrapper .hero-link:hover:after,
.ufclas-featured-posts-wrapper .hero-link:focus:after,
.ufclas-featured-posts-wrapper .hero-link.hovered:after {
    transform: translateY(0%);
}

.ufclas-featured-posts-wrapper .hero-link:hover .hero-link-inner,
.ufclas-featured-posts-wrapper .hero-link:focus .hero-link-inner,
.ufclas-featured-posts-wrapper .hero-link.hovered .hero-link-inner {
    transform: translateY(0px);
}

.ufclas-featured-posts-wrapper .hero-link:hover p,
.ufclas-featured-posts-wrapper .hero-link:focus p,
.ufclas-featured-posts-wrapper .hero-link.hovered p {
    visibility: visible;
    opacity: 1;
    transform: translateY(0%);
}

/* Excerpt Enabled: Hover animation behavior (default) */
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled h1,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled h2 {
    margin: 0;
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
}

.ufclas-featured-posts-wrapper .hero-link.excerpt-enabled h2 {
    margin: 0;
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
}

/* Collapse excerpts to zero height when hidden */
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled p {
    max-height: 0;
    overflow: hidden;
}

.ufclas-featured-posts-wrapper .hero-link.excerpt-enabled p {
    max-height: 0;
    overflow: hidden;
}

.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:hover h1,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:hover h2,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:focus h1,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:focus h2,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:focus-within h1,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:focus-within h2,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled.hovered h1,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled.hovered h2 {
    transform: translateY(-50px);
}

.ufclas-featured-posts-wrapper .hero-link.excerpt-enabled:hover h2,
.ufclas-featured-posts-wrapper .hero-link.excerpt-enabled:focus h2,
.ufclas-featured-posts-wrapper .hero-link.excerpt-enabled.hovered h2 {
    transform: translateY(-50px);
}

/* Expand excerpts on hover */
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:hover p,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:focus p,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled:focus-within p,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-enabled.hovered p {
    max-height: 200px;
}

.ufclas-featured-posts-wrapper .hero-link.excerpt-enabled:hover p,
.ufclas-featured-posts-wrapper .hero-link.excerpt-enabled:focus p,
.ufclas-featured-posts-wrapper .hero-link.excerpt-enabled.hovered p {
    max-height: 200px;
}

/* Excerpt Disabled: Fixed title, no excerpt */
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-disabled p,
.ufclas-featured-posts-wrapper .hero-link.excerpt-disabled p {
    display: none !important;
}

.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-disabled h1,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-disabled h2 {
    margin: 0;
}

.ufclas-featured-posts-wrapper .hero-link.excerpt-disabled h2 {
    margin: 0;
}

.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-disabled .featured-hero-link-inner,
.ufclas-featured-posts-wrapper .hero-link.excerpt-disabled .hero-link-inner {
    transform: translateY(0) !important;
}

/* Prevent any title movement on hover when excerpt is disabled */
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-disabled:hover .featured-hero-link-inner,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-disabled:focus .featured-hero-link-inner,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-disabled:focus-within .featured-hero-link-inner,
.ufclas-featured-posts-wrapper .news-hero-featured.excerpt-disabled.hovered .featured-hero-link-inner,
.ufclas-featured-posts-wrapper .hero-link.excerpt-disabled:hover .hero-link-inner,
.ufclas-featured-posts-wrapper .hero-link.excerpt-disabled:focus .hero-link-inner,
.ufclas-featured-posts-wrapper .hero-link.excerpt-disabled.hovered .hero-link-inner {
    transform: translateY(0) !important;
}

/* Error message styles */
.ufclas-fp-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Responsive adjustments */
@media only screen and (max-width: 1054px) {
    .ufclas-featured-posts-wrapper .news-hero-featured h1,
    .ufclas-featured-posts-wrapper .news-hero-featured h2 {
        font-size: 36px;
        line-height: 38px;
    }
    
    .ufclas-featured-posts-wrapper .hero-link h2 {
        font-size: 28px;
        line-height: 32px;
    }
    
    .ufclas-featured-posts-wrapper .news-hero-featured p,
    .ufclas-featured-posts-wrapper .hero-link p {
        font-size: 18px;
        line-height: 24px;
    }
}

@media only screen and (max-width: 767px) {
    .ufclas-featured-posts-wrapper .news-hero-wrapper {
        min-height: auto;
    }
    
    .ufclas-featured-posts-wrapper .news-hero-featured,
    .ufclas-featured-posts-wrapper .hero-link {
        min-height: 200px;
    }
}