/*
Theme Name: CNRA Entity Theme
Version: 1.0
Author: California Natural Resources Agency
Author URI: https://resources.ca.gov/
Description: Theme for CNRA hosted entity websites, running CA Web Template version 6.4.1. Content editing is powered by Advanced Custom Fields Pro (ACF Pro).
*/

.alert-text p {
    margin-bottom: 0;
}

@media screen and (max-width: 767px) {
    .utility-nav-custom {
        display: none !important;
    }
}

/* Fixes mobile navigation item height issue (items too tall by default). */
@media screen and (max-width: 991px) {
    .full-width-nav .nav-item .first-level-link, .full-width-nav .nav-item .first-level-btn {
        height: unset;
    }
}

@media screen and (min-width: 992px) {
    .z-index-increase-custom {
        z-index: 99;
    }
}

/* Removes external link icon from buttons/ links - not required in theme */
.external-link-icon {
    display: none;
}

.gsc-search-button {
    width: 45px !important;
}

.justify-center {
    justify-content: center;
}

@media screen and (max-width: 991px) {
    .justify-center-mobile {
        justify-content: center;
    }
}

@media screen and (max-width: 991px) {
    .margin-top-mobile-custom {
        margin-top: 1rem;
    }
}

.flex-row-reverse {
    display: flex;
    flex-direction: row-reverse;
}

@media (max-width: 991px) {
    .flex-col-reverse-exec-profile {
        display: flex;
        flex-direction: column-reverse !important;
    }
}

.flex-column-reverse {
    display: flex;
    flex-direction: column-reverse;
    height: fit-content;
}

@media (max-width: 991px) {
    .margin-auto-custom {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 992px) {
    .col2-position-2col-custom {
        transform: translateY(-55px);
    }

    .col2-position-postsland-custom {
        transform: translateY(-30px);
    }
}

.margin-bottom-custom {
    margin-bottom: 2rem;
}

.col2-position-2col-custom iframe {
    width: 100% !important;
}

/* Override default styles for Utility Header and nested Google Translate widget */
.utility-header-custom {
    background: var(--color-p2);
    color: var(--white, #FFF);
}

.utility-header-custom a {
    color: var(--white, #FFF);
}

.utility-header-custom a:hover, .utility-header a:focus, .utility-header a.hovered {
    color: unset;
}

#google_translate_element span {
    display: none;
}


#google_translate_element #\:0\.targetLanguage {
    height: 10px;
}

.goog-logo-link {
    display:none !important;
} 
    
.goog-te-gadget{
    color: transparent !important;
}

.header-primary-banner a {
    color: #FFFFFF;
}

.header-primary-banner ul,
.header-primary-banner ol {
    list-style-position: inside;
    text-align: center;
    padding: 0;
}

.header-banner-min-height-custom {
    min-height: 400px;
}

.body-banner-min-height-custom {
    min-height: 200px;
}

@media (min-width: 769px) {
    .banner-heading-size-custom {
        font-size: 4rem !important;
    }
}

.text-shadow-custom {
    text-shadow: 0px 0px 8px #000000;
}

.banner-text-container-custom {
    background: rgba(0, 0, 0, 0.7); 
    margin: auto; 
    border-radius: 1rem;
}

.body-banner-width-custom {
    width: calc(100vw); 
    margin-left: calc(-50vw + 50%);
}

.banner-custom hr {
    margin-top: 16px;
}

.body-banner-width-custom hr {
    width: 90%;
    margin-left: 5%;
    margin-right: 5%;
}

.text-dark p {
    color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
}

.default-cursor {
    cursor: default;
}

.color-dark {
    color:  #323a45 !important;
}

.width-100-percent {
    width: 100%;
}

@media (min-width: 1400px) {
    .container-wide {
        max-width: 1360px;
    }
}

/* Override default WYSIWYG styles to allow image algnment in accordion components */
cagov-accordion .aligncenter,
.accordion .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

cagov-accordion .alignright,
.accordion .alignright {
    display: block;
    margin-left: auto;
    margin-right: 0;
}

.card-icon-custom {
    font-size: 4rem;
}

.card-img-custom {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover;
}

@media (min-width: 992px) {
    .card-img-custom-1-2col {
        height: 350px !important;
    }
}

/* Override default column styles for card components in col 2 */
.col-lg-4 .col-lg-6 {
    flex: 0 0 auto;
    width: 100%;
}

.col-2-static-card-custom .col-md-8,
.col-2-static-card-custom .col-lg-4 {
    flex: 0 0 auto;
    width: 100%;
}

/* Multiple card custom spacing in row */
@media (min-width: 992px) {
    .custom-card-margin {
        margin-left: 3rem;
        margin-right: 3rem;
    }
}

@media (min-width: 992px) {
    .exec-profile-custom {
        align-items: stretch;
    }
}

.exec-profile-dark-custom {
    background: #323a45 !important;
}

.margin-bottom-not-last {
    margin-bottom: 1rem !important;
}

.exec-image-dimensions-custom {
    width: 100px !important;
    height: 100px !important;
}

.exec-profile-body-custom {
    width: 250px;
}

@media (max-width: 991px) {
    .margin-bottom-custom-mobile {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 991px) {
    .col-sm-12 .margin-bottom-custom-mobile + .btn-row {
        padding-top: 0px !important;
    }
}

/* Individual post custom styles */
.img-fluid.wp-post-image {
    width: 100%;
    height: auto;
}

.attachment-post-thumbnail.size-post-thumbnail.wp-post-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    margin-bottom: 32px;
}

.margin-custom {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.margin-top-custom {
    margin-top: 1rem;
}

/* Post landing pages custom styles */
.post-item-container {
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .post-item-container {
        flex-direction: row;
    }
}

.post-item-image {
    flex: 1 0 33%;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

.post-item-image img {
    max-height: 300px !important;
}

@media (min-width: 768px) {
    .post-item-image img {
        max-height: 400px !important;
    }
}

@media (min-width: 992px) {
    .post-item-image {
        max-width: 33%;
        margin-right: 32px;
        margin-bottom: 0;
    }
    .post-item-image img {
        height: auto !important;
        max-height: 300px !important;
    }
}

.post-item-details {
    flex: 2 0 66%;
}

.lead {
    margin-top: 1.5rem;
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.pagination {
    display: inline-block;
    margin-top: 10px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    background-color: #f5f5f5;
    color: #24557F;
    text-decoration: none;
    border-radius: 4px;
    line-height: 1.42857143;
}

.pagination .current {
    font-weight: bold;
    background-color: #24557F;
    color: #fff;
    border-color: #24557F;
}

.pagination .prev, .pagination .next {
    padding: 0;
}

.pagination .prev:before, .pagination .next:after {
    content: ' ';
}

#filter-by, #filter-by-all, #sort-by {
    margin-right: 8px;
}

@media (min-width: 768px) {
    #filter-by, #filter-by-all, #sort-by {
        margin-left: 8px;
    }
}

.sort-filter-container {
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .sort-filter-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.sort-container {
    margin-left: unset;
}

@media (min-width: 992px) {
    .sort-container {
        margin-left: auto;
    }
}

/* Featured Posts component custom styles */
.post-item-container-featured {
    display: flex;
    flex-direction: column;
}

.post-item-container-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;    
}

.post-item-image-featured {
    width: 100%;
    height: 300px;
}

@media (min-width: 992px) {
    .post-item-image-featured {
        height: 250px;
        overflow: hidden;
    }
}

/* Embed component custom styles */
@media (max-width: 991px) {
    .video-embed-mobile-custom {
        text-align: center !important;
    }
}

@media (max-width: 767px) {
    .video-embed-container-custom {
        position: relative;
        overflow: hidden;
        padding-top: 56.25%;
    }
}

@media (min-width: 992px) {
    .center-align-custom {
        text-align: center !important;
    }
}

@media (max-width: 767px) {
    .video-embed-custom {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* 404 page custom styles */
.main-content-404-custom {
    padding-bottom: 150px;
}

/* Accessibility Modifications */

/* Override link focus styles for accessibility */
a:focus {
    outline: solid 2px #005FCC !important;
}

/* Override default main navigation styles for accessibility (DEFAULT NAV) */
.full-width-nav .nav-item .first-level-link:hover, .full-width-nav .nav-item .first-level-link:focus, .full-width-nav .nav-item .first-level-btn:hover, .full-width-nav .nav-item .first-level-btn:focus {
    text-decoration: underline;
}

.full-width-nav .nav-item .first-level-link:focus, .full-width-nav .nav-item .first-level-btn:focus {
    outline: solid 2px #005FCC !important;
}

/* Override default main navigation styles for accessibility (ICON NAV) */
.first-level-link:focus, .first-level-btn:focus {
    outline: solid 2px #005FCC !important;
}

/* Override main nav logo focus styles for accessibility */
.branding .header-organization-banner a:focus {
    outline: solid 2px #005FCC !important;
}

/* Override Utility Header link focus styles for accessibility */
.utility-header a:focus {
    outline: solid 2px #FFFFFF !important;
}

/* Override search bar focus styles for accessibility */
.search-container .search-textfield:focus, .featured-search.active .search-textfield:focus {
    outline: solid 2px #005FCC !important;
}

/* Override button focus styles for accessibility */
.btn-primary:focus {
    outline: solid 2px #005FCC !important;
}

/* Override search input and button styles for accessibility */
input:focus, textarea:focus, button:focus, select:focus {
    outline: solid 2px #005FCC !important;
}

.gsc-search-button {
    background-color: #777481 !important;
}

.gsc-search-button:focus {
    outline: solid 2px #030303 !important;
    background-color: #777481 !important;
}

.gsc-search-button:hover {
    background-color: #4a4958 !important;
}

.search-container.active {
    background-color: #FEFDFF !important;
}

/* Override default footer styles for accessibility */
.global-footer .footer-links li a:hover {
    text-decoration: underline;
    color: var(--black, #000);
}

/* Override default table styles for accessibility */
.table td a {
    color: #046B99;
}

.table td a:hover {
    color: #046B99;
}