@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: swap; /* Clave para Core Web Vitals */
  src: url("/plugins/system/t4/themes/base/vendors/font-awesome-6/webfonts/fa-solid-900.woff2") format("woff2");
}

@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: swap; /* Clave para Core Web Vitals */
  src: url("/plugins/system/t4/themes/base/vendors/font-awesome-6/webfonts/fa-brands-400.woff2") format("woff2");
}


/* Prevenir layout thrashing de AdSense */
/* Prevenir layout thrashing de AdSense - MEJORADO */
.adsbygoogle:not([data-anchor-shown]):not([data-anchor-status]):not(.ads-in-categories) {
  min-height: 280px;
  contain: layout style paint;
  display: block;
  margin: 20px auto;
}


/* Anuncios anchor/sticky NO necesitan min-height */
.adsbygoogle[data-anchor-shown="true"],
.adsbygoogle[data-anchor-status] {
  min-height: 0 !important;
  contain: none !important;
  margin: 0 !important;
}

/* Contenedores auto-placed normales */
.google-auto-placed:not([data-anchor-shown]) {
  max-width: 100% !important;
  contain: layout !important;
}

/* Contenedores de anchor ads específicos */
.google-auto-placed[data-anchor-shown="true"] {
  max-width: 100% !important;
  contain: none !important;
  position: fixed !important;
}


.card1 {
    position: relative;	
    display: flex;
    flex-direction: column;
    background-clip: border-box;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Estilos para el contenedor de video */
#video-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

#video-placeholder {
    z-index: 2;
    background-color: #f0f0f0;
}

#video-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 200px;
}

#youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#play-button {
    z-index: 3;
}

/* Media queries para ajustar la altura mínima en pantallas más grandes */
@media (min-width: 576px) {
    #video-wrapper,
    #video-placeholder img {
        min-height: 300px;
    }
}

@media (min-width: 768px) {
    #video-wrapper,
    #video-placeholder img {
        min-height: 400px;
    }
}

/* Estilos para la miniatura del video */
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
}

/* Estilos para el TOC */
.toc-title {
    top: 0;
    z-index: 1020;
    position: sticky;
    background-color: #fff;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.toc-content {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding-right: 10px;
    transition: all 0.3s ease;
}

.toc-content.is-sticky {
    position: fixed;
    top: 20px;
    width: 100%;
    max-width: 300px;
}

.toc-check {
    cursor: pointer;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.toc-check.watched::after {
    content: '✓';
    color: #4CAF50;
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.toclink {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #333333;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin-bottom: 5px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.toclink:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    color: #333333;
}

.toclink.active {
    background-color: #e6f0ff;
    color: #0056b3;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Estilos para la barra de desplazamiento del TOC */
.toc-content::-webkit-scrollbar {
    width: 6px;
}

.toc-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.toc-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.toc-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.max-h-500 {
    max-height: 500px;
}

/* Estilos responsivos */
@media (max-width: 991.98px) {
    #mobile-toc {
        margin-top: 1rem;
    }

    .toc-content {
        max-height: 300px;
    }

    .toclink {
        font-size: 0.9rem;
    }

    .max-h-500 {
        max-height: 300px;
    }

    .toc-content.is-sticky {
        position: static;
        max-width: none;
    }
}

/* Estilos adicionales */
.feed-item-description p {
    display: inline;
    margin: 0;
    padding: 0;
}

.ads-preloader {
    background: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 50%, #ccc 50%, #ccc 75%, transparent 75%, transparent);
    background-size: 10px 10px;
    position: relative;
    width: 100%; 
    min-height: 280px; 
}

.jfilters-item-link--selected {
    font-weight: 700;
    color: #007bff;
    background-color: #f1f1f1;
    padding: 0.2em 0.4em;
    border-radius: 5px;
}

#jfilters-filter-list-111-4 {
    padding: .8rem 0 .5rem 0;
    border-bottom: 1px solid #dfdfdf;
    max-height: 15em;
    overflow: auto;
    position: relative;
}

.com-content-categories__item-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    display: inline-block;
    margin-right: 5px;
}

/* Estilos para clientes */
.acm-clients.style-1 .clients-desc {
    text-align: center;
    text-transform: uppercase;
    margin-bottom: var(--gutter-normal);
    font-weight: 900;
}

.acm-clients.style-1 .clients-desc span {
    color: var(--color-primary);
}

.acm-clients.style-1 .clients-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gutter-lg);
    justify-content: center;
    align-items: center;
}

.acm-clients.style-1 .client-img {
    text-align: center;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.acm-clients.style-1 .client-img img {
    max-height: 36px;
    max-width: 200px;
    opacity: 0.8;
}

.acm-clients.style-1 .client-img img:hover {
    opacity: 1;
}

/* Estilos para calificación de contenido */
.content_rating ul {
    margin-bottom: .5em;
    padding-inline-start: 0;
    list-style: none;
}

.content_rating .vote-star,
.content_rating .vote-star-empty,
.content_rating .vote-star-half {
    display: inline-block;
}

.content_rating .vote-star svg,
.content_rating .vote-star-half svg {
    fill: var(--color-warning);
    width: 1.5em;
    height: 1.5em;
}

.content_rating .vote-star-empty svg {
    fill: #d3d3d3;
    width: 1.5em;
    height: 1.5em;
}

.content_rating .vote-star-half {
    margin-inline-start: -1em;
}

[dir=rtl] .content_rating .vote-star-half {
    transform: scaleX(-1);
}

/* Estilos para contenedor de anuncios */
.ad-container {
  position: relative;
  overflow: hidden;
  max-width: 1200px;
  margin: 1.5rem auto;
  background: #fff;
  border-radius: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ad-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: auto 336 / 280; /* Relación para anuncios fluid */
  min-height: 280px;
  max-height: 400px;
  background: linear-gradient(135deg, #f5f5f5 0%, #f0f0f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  contain: layout style paint;
}

.ad-placeholder img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid;
}

.ad-content {
    position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    transparent 0%, 
    transparent 48%, 
    #e8e8e8 48%, 
    #e8e8e8 52%, 
    transparent 52%, 
    transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  z-index: 1;
}

.ad-content span {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}

/* INS de AdSense - FUERZA altura constante */
.ad-placeholder ins.adsbygoogle {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  z-index: 2;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 280px !important;
  background: inherit;
  contain: layout style paint;
}

/* Iframe dentro del INS - IMPORTANTE */
.ad-placeholder ins iframe {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Google auto-placed ads dentro del contenedor */
.ad-placeholder .google-auto-placed {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 280px !important;
  display: block !important;
  contain: layout style paint;
}

/* Clearfix al final */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsivo - Ajusta altura según pantalla */
@media (max-width: 600px) {
  .ad-placeholder {
    min-height: 250px;
    aspect-ratio: auto 300 / 250;
  }
  
  .ad-placeholder ins.adsbygoogle {
    min-height: 250px !important;
  }
}

@media (min-width: 768px) {
  .ad-placeholder {
    min-height: 280px;
    aspect-ratio: auto 728 / 90;
  }
}

/* Prevenir que ads inyectados causen shift */
.ad-placeholder > div:not(.ad-content) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  contain: layout style paint;
}

/* Script tags de AdSense */
.ad-placeholder script {
  display: none !important;
}
.ads-adsense 
{display: block;  width: 100%;  min-height: 200px;  height: auto;  background-color: #ffffff;  font-size: 18px;  color: #333;}
@media (max-width: 992px) 
{ .ads-adsense { min-height: 200px; }
  .sidebar-l {  flex: 0 0 auto !important;}
}


/*Fields*/

.fields-container{
	padding: 0px;
}

/* Estilos para el layout del artículo */
.article-layout {
    display: flex;
    flex-direction: column;
}

.main-content {
    order: 1;
}

.toc-sidebar {
    order: 2;
}

@media (min-width: 992px) {
    .article-layout {
        flex-direction: row;
    }
    .main-content {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
        padding-right: 15px;
    }
    .toc-sidebar {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        padding-left: 15px;
    }
}