/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.0
*/

.title_cursiva {
    font-style: italic;
}

/* Taboola CLS Optimization */
.taboola-mid-article-placeholder,
#taboola-mid-article-thumbnails-new {
    contain: layout paint;
    overflow-anchor: none;
    min-height: 490px;
}
@media (min-width: 768px) {
    .taboola-mid-article-placeholder,
    #taboola-mid-article-thumbnails-new {
        min-height: 560px;
    }
}

.taboola-mid-photo-gallery-placeholder,
#taboola-mid-photo-gallery-thumbnails {
    contain: layout paint;
    overflow-anchor: none;
    min-height: 360px;
}
@media (min-width: 768px) {
    .taboola-mid-photo-gallery-placeholder,
    #taboola-mid-photo-gallery-thumbnails {
        min-height: 555px;
    }
}

.taboola-below-article-placeholder,
#taboola-below-article-thumbnails,
#taboola-below-article,
#taboola-below-article-second {
    contain: layout paint;
    overflow-anchor: none;
    min-height: 1600px;
}
@media (min-width: 768px) {
    .taboola-below-article-placeholder,
    #taboola-below-article-thumbnails,
    #taboola-below-article,
    #taboola-below-article-second {
        min-height: 1500px;
    }
}

/* Taboola Homepage CLS Optimization */
#taboola-mid-homepage-thumbnails-1 {
    contain: layout paint;
    overflow-anchor: none;
    min-height: 470px !important; /* Alto real medido en mobile */
}
@media (min-width: 768px) {
    #taboola-mid-homepage-thumbnails-1 {
        min-height: 372px !important; /* Alto real medido en desktop */
    }
}

/* YouTube Defer Facade */
.lazy-youtube-embed {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: 1.5em auto;
    aspect-ratio: 16 / 9;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.lazy-youtube-play-btn {
    width: 68px;
    height: 48px;
    background-color: rgba(33, 33, 33, 0.9);
    border: none;
    border-radius: 12%;
    position: relative;
    cursor: pointer;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s;
    outline: none;
    padding: 0;
}

.lazy-youtube-embed:hover .lazy-youtube-play-btn {
    background-color: #ff0000;
    transform: scale(1.1);
}

.lazy-youtube-play-btn::before {
    content: "";
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
}

/* Aspect-ratio safeguard for category/archive featured images */
.post-featured-img-wrap {
    aspect-ratio: 3 / 2;
}

/* FontAwesome 5 Override to prevent legacy Salient v4 font-family override */
.fab, i.fab, span.fab, [class*="fa-"].fab {
    font-family: "Font Awesome 5 Brands" !important;
}
.fas, i.fas, span.fas, [class*="fa-"].fas {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}
.far, i.far, span.far, [class*="fa-"].far {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 400 !important;
}
