/*
Theme Name: Sporttales Child
Theme URI: https://sporttales.it
Author: TuchSoft
Author URI: https://tuchsoft.com
Description: Tema child di Newsup per sporttales.it. Contiene le personalizzazioni Sporttales (tab "Dai social", playlist YouTube, footer social), le librerie aggiornate (Owl Carousel v2) e le funzioni custom del sito. Nota tecnica: WordPress ammette solo due generazioni di temi, quindi il parent dichiarato e' newsup (lo stesso parent del tema newstack da cui derivano questi file).
Version: 1.0.0
Requires PHP: 7.4
Requires at least: 6.6
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Template: newsup
Text Domain: newstack
Tags: blog, portfolio, news, grid-Layout, right-sidebar, custom-background, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, translation-ready, block-styles, wide-blocks
*/
:root{
	--bodyFont: 'Inter', sans-serif;
	--headFont: "Poppins", sans-serif;
}
a:focus {
    outline: 1px solid;
}

span.time {
    margin-left: 5px;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    line-height: 35px;
}
.mg-social li span.icon-soci { 
    float: unset;
}
.mg-headwidget.center .heacent {
    margin-top: unset !important;
}
.mg-headwidget.center .logo-center, .mg-headwidget.center .navbar-header, .mg-headwidget.center .site-branding-text  {
    float: none;
    text-align: center;
}

.mg-headwidget.center .navbar-brand {
    float: none;
    display: inline-block;
    margin: 8px auto 0 auto;
    font-weight: bold;
}
.mg-headwidget.center .heacent {
    margin-top: 40px;
    color: #fff;
}
.navbar-wp .dropdown-menu.searchinner .btn {
    border: medium none;
    border-radius: 0 4px 4px 0;
    height: 40px;
    line-height: 25px;
    padding: 5px 15px;
}
.mg-search-box .dropdown-toggle::after {
	display: none;
}
.m-header {
	display: none;
}
.desk-header {
	display: flex;
}
.mobilehomebtn {
    width: 30px;
    text-align: center;
    line-height: 30px;
    height: 30px;
}
.logo-auto {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.mg-blog-post.md{
	width: 49.8%;
	float: left;
	height: 236px;
}
.mg-blog-post.md .bottom h4 {
    font-size: 26px;
}
.mb1px {
	margin-bottom: 1px;
}
.mg-blog-post.lg.mins {
	width: 100%;
	height: 222.5px;
	margin-bottom: 30px;
}
.mg-blog-post.lg.mins h4.title {
	font-size: 22px;
}
.mg-blog-post-box .mg-header {
    padding: 20px 20px;
}
footer .site-description {
    letter-spacing: 1.2px; 
}
.mg-headwidget .site-branding-text .text-center {
    color: #fff;
    text-align: center;
}
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper { 
    box-shadow: 0 1px 3px rgb(0 0 0 / 15%);
}
.mg-social.info-right a:focus{
    outline: none;
}
.mg-nav-widget-area .navbar-brand{
    margin-right: 0;
}
.comment-detail .edit-link a, 
.comment-detail .reply a, 
pre.wp-block-code a {
    text-decoration: underline;
}
.mg-latest-news .mg-latest-news-slider{
    left: 185px;
}
div.mg-latest-news .bn_title span {
    border: none;
    top: unset;
    right: unset;
}
.wp-block-search .wp-block-search__label, .mg-widget .wp-block-group h2, .mg-sidebar .mg-widget .wtitle, .mg-sec-title h4, footer .mg-widget h6{
    padding-right: 15px;
}
:is(.wp-block-search .wp-block-search__label, .mg-widget .wp-block-group h2, .mg-sidebar .mg-widget .wtitle, .mg-sec-title h4, footer .mg-widget h6)::before{
    display: none;
}
.mg-blog-category a{
    text-transform: capitalize;
    padding: 5px 10px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}
.mg-sidebar .mg-widget .wtitle{
    font-weight: 700;
}
.mg-posts-modul-6 .mg-sec-top-post .title{
    font-size: 24px;
    line-height: 1.5;
}
.mg-posts-sec-inner .mg-posts-sec-post, .mg-sidebar .mg-widget{
    box-shadow: 0 0 8px 2px rgba(23, 23, 35, 0.05);
    border-radius: 0;
    border: none;
}
.mg-sidebar .mg-widget.widget_search:not(:has(.wp-block-search__button-outside)){
    padding-top: 0;
}
.wp-block-search.wp-block-search__button-only .wp-block-search__button{
    align-items: center;
}
.widget_search:has(.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden){
    padding-left: 0;
    padding-right: 0;
}
.widget_search:has(.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden) .wp-block-search__label{
    margin-left: 0;
}
.mg-posts-modul-6 .mg-post-thumb{
    margin-right: -5px;
}
.mg-tpt-tag-area, .mg-latest-news-sec{
    margin-top: 20px;
    padding: 0;
}
.mg-tpt-tag-area .mg-tpt-txnlst{
    padding: 2px 5px;
}
.mg-latest-news-sec{
    box-shadow: none;
}
.mg-latest-news-sec .mg-latest-news{
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
}

/* Animation */
.mg-latest-news .bn_title .title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-right: 8px;
}
/* The icon */
.bn_title .title::before {
    content: "\e0b7";   /* Font Awesome unicode */
    font-family: "Font Awesome 6 Free"; /* Or your FA font */
    font-weight: 900;
    font-size: 16px;
    position: relative;
    z-index: 2;
}
/* Ripple animation container (behind icon) */
.bn_title .title::after {
    content: "";
    position: absolute;
    left: 26px;       /* adjust position relative to icon */
    top: 50%;
    transform: translateY(-50%) translateX(0);
    width: 35px;
    height: 35px;
    border: 2px solid #fff;
    border-radius: 50%;
    opacity: 0;
    animation: zoom 2s linear infinite;
    z-index: 1;
}
/* Additional ripples */
.bn_title .title span::before,
.bn_title .title span::after {
    content: "";
    position: absolute;
    right: -41px;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border: 2px solid #fff;
    border-radius: 50%;
    opacity: 0;
    z-index: 1;
}
.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.bn_title .title span::before {
    animation: zoom 2s linear 0.5s infinite;
}

.bn_title .title span::after {
    animation: zoom 2s linear 1s infinite;
}
@keyframes zoom {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* ============================================= Responsive Part ======================================== */

@media (min-width: 1200px) {
    .mg-blog-post.md .bottom h4 {
        max-height: 65px;
        overflow: hidden;
    }
}
@media (max-width: 991px) {
	.navbar-wp .navbar-nav > li> a i {
    	display: none;
	}	
    #menu-primary li.active.home {
        display: none;
    }
    .m-header {
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
        display: flex;
        justify-content: space-between;
    }
    .desk-header {
        display: none;
    }
}
@media (max-width: 767px) and (min-width: 576px) {
    .mg-fea-area .col-md-3 {
        display: flex;
    }
    .mg-fea-area .mg-blog-post.lg.mins {
        margin: 0 5px 30px 0;
    }
    .mg-fea-area .col-md-3.top-right-area{
        display: block;
    }
}
@media screen and (max-width: 767px) and (min-width: 240px) {
    .mg-headwidget .navbar-wp .navbar-nav > li> a {
        position: relative;
        border-bottom: 1px solid rgba(225,225,225,0.4);
    }
}
@media (min-width: 240px) and (max-width: 576px){
    .mg-fea-area .mg-blog-post.lg.mins,.mg-fea-area  .mg-posts-sec {
        margin-bottom:20px;
    }

    .mg-fea-area .mr-bot60 {
        margin-bottom: 50px;
    }
	
	.choosen {
		margin-top: 20px !important;
	}
	
	.top-right-area {
		display: none;
	}
	
	.owl-dots {
		left: 37%;
	}
}


/* CUSTOM */



.owl-dots {
	bottom: 0;
}

.owl-stage-outer, .owl-stage, .owl-item, .owl-item > .item, .owl-item > .item .mg-blog-post {
	height: 100%;
}

.choosen, .social-tab {
    display: flex;
    flex-direction: column;
    min-height: 500px; /* O l'altezza che preferisci, es. 100% se il padre è alto */
	height: 100%
    justify-content: space-between; /* Distribuisce lo spazio automaticamente */
}

.choosen .mg-blog-post, .social-tab .social {
    flex: 1; /* Entrambi i post crescono equamente per riempire l'altezza */
    margin-bottom: 20px !important; /* Spazio fisso tra i due */
    height: auto !important; /* Sovrascrive il 47% che dava problemi */
}

.choosen .mg-blog-post:last-child, .social-tab > .social-instagram {
    margin-bottom: 0 !important; /* Rimuove lo spazio sotto l'ultimo */
}


#exTab2, .main-slider {
	min-height: 500px;
}

#exTab2 .nav-tabs {
	font-size: 14px;
}


.instagram-gallery__actions {
	display: none !important;
}

.instagram-gallery-item__icon {
	opacity: 1 !important;
	font-size: 40px !important;
}

.instagram-gallery-feed .swiper-container .swiper-button-next, .instagram-gallery-feed .swiper-container .swiper-button-prev    {
	color: white !important;
}

.social-instagram, .social-instagram * {
		max-height: 350px !important;
}

.mg-head-detail {
	display: none;
}

.mg-nav-widget-area-back {
	height: 150px;
}

#silktide-banner button.preferences {
	background: unset;
	font-weight: unset;
	box-shadow: unset;
}
.silktide-logo, #silktide-cookie-icon {
	display: none !important;
}

#silktide-modal .preferences-reject-all, #silktide-banner button.reject-all {
    background: var(--secondary) !important;
}
#silktide-wrapper .st-button {
	border: unset !important;
}

#silktide-modal .preferences-reject-all:hover, #silktide-wrapper button.reject-all:hover {
    background-color: var(--backgroundColor) !important;
    color: var(--primaryColor);
}


.site-logo img {
	    max-height: 110px;
    width: auto;
}



/* ==========================================================================
   Sporttales Child - aggiunte nostre
   Qui sotto solo roba del child: non tocca i file del tema parent.
   ========================================================================== */

/* Badge "IN DIRETTA" sopra il player YouTube (usato quando il flag diretta e' attivo) */
.social-youtube-wrap { position: relative; }
.social-youtube-live-badge {
    display: inline-block;
    margin-bottom: 6px;
    padding: 3px 10px;
    border-radius: 3px;
    background: #d90429;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.social-youtube-live-badge .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #fff;
    animation: sporttales-live-pulse 1.4s infinite;
}
@keyframes sporttales-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .25; }
}

/* Interruttore diretta nella barra in alto */
#wp-admin-bar-sporttales-live > a .ab-icon:before { top: 2px; }
#wp-admin-bar-sporttales-live > a { font-weight: 600; }
#wp-admin-bar-sporttales-live.sporttales-live-off > a { color: #ff6b6b; }
#wp-admin-bar-sporttales-live.sporttales-live-on > a { background: #d90429; color: #fff; }

/* Avviso dopo il click sull'interruttore */
.sporttales-live-notice {
    position: relative;
    z-index: 10;
    padding: 8px 16px;
    background: #143745;
    color: #fff;
    font: 500 14px/1.5 'Inter', sans-serif;
    text-align: center;
}

/* Player inserito con lo shortcode [diretta] */
.sporttales-embed {
    position: relative;
    margin: 0 0 18px;
    background: #000;
}
.sporttales-embed iframe { display: block; width: 100%; border: 0; }
