/* =============================================================================
   1. MULTIMEDIA Y VÍDEOS RESPONSIVE
   ============================================================================= */
iframe, object, embed {
    max-width: 100%;
    max-height: 100%;
}

iframe[title="YouTube video player"] {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: 100%;
    border: 0;
}

/* =============================================================================
   2. ARTÍCULOS Y BLOG (CORRECCIÓN DE IMAGEN Y TEXTO)
   ============================================================================= */

/* Asegura que el artículo limpie los floats */
article {
    clear: both;
}

/* CORRECCIÓN: Imagen principal arriba y texto abajo */
.item-image {
    float: none !important;
    display: block !important;
    margin: 0 auto 20px auto !important;
    text-align: center;
    width: 100%;
}

.item-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Asegurar que el contenido del artículo se muestre correctamente */
.com-content-article__body {
    overflow: visible;
    display: block;
    color: inherit;
    clear: both; /* Refuerzo para que el texto baje */
}

.com-content-article__body h3,
.com-content-article__body p,
.com-content-article__body ol {
    margin-left: 0;
    padding-left: 0;
}

.com-content-article__body ol {
    padding-left: 20px;
}

/* Cambiar color de los títulos de secciones específicas */
#rlta-conoce-nuestro-trabajo h3,
#rlta-que-lineas-de-accion h3,
#rlta-como-las-actividades h3,
#rlta-quienes-los-formadores-y-nuestro-objetivo h3,
#rlta-donde---entidades-y-lugares h3 {
    color: #dd6664 !important;
}

/* Títulos en la vista de blog */
.com-content-category-blog__items.blog-items.masonry-3 .tck-article-title {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.5px;
    color: #2c3e50;
    font-family: 'Roboto', 'Arial', sans-serif;
    margin-bottom: 15px;
    height: 3.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    text-align: center;
}

/* Estilos para el cuerpo del artículo en la vista de blog */
.com-content-category-blog__items.blog-items.masonry-3 .tck-article-body {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.5em;
}

/* Estilos para la vista de artículo individual */
.tck-article.com-content-article.item-page .tck-article-title,
.tck-article.com-content-article.item-page .tck-article-body {
    display: block;
    -webkit-line-clamp: unset;
    min-height: unset;
    overflow: visible;
}

/* Botones "Leer más" */
.readmore .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 4em;
    padding: 0;
    margin-top: 10px;
    text-align: center;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1.5;
}

.readmore .btn:hover {
    background-color: #5a6268;
}

/* Quitar elementos no deseados */
.d-flex.my-1 a, ul.tags.list-inline {
    display: none;
}

/* =============================================================================
   3. DISCOGRAFÍA Y SECCIONES ESPECIALES
   ============================================================================= */
.discografia .item-image {
    width: 100%;
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
}

.discografia .item-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: 100%;
    object-fit: contain;
}

/* =============================================================================
   4. TIENDA Y CHECKOUT (PHOCART)
   ============================================================================= */
#ph-pc-checkout-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ph-header {
    font-size: 28px;
    width:100%;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.ph-checkout-cart-title a {
    font-size: 16px;
    font-weight: bold;
    color: #ff7f00;
    text-decoration: none;
}

.ph-checkout-cart-brutto, .ph-cart-total, .ph-checkout-total-amount {
    color: #ff7f00;
    font-weight: bold;
}

.ph-checkout-box-header {
    background-color: #333;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
}

.ph-checkout-icon-spec-box span.ph-checkout-icon-spec-finished {
    display: none;
}

/* Botones Éxito/Peligro */
.uk-button-success { background-color: #28a745; color: #fff; border-radius: 4px; }
.uk-button-danger { background-color: #dc3545; color: #fff; border-radius: 4px; }

/* =============================================================================
   5. CARRITO Y TABLAS
   ============================================================================= */
.ph-cart-module-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ph-cart-link-checkout a {
    background-color: #ff7f00;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

/* =============================================================================
   6. RESPONSIVE Y AJUSTES MÓVILES
   ============================================================================= */
@media (max-width: 768px) {
    .item-image {
        float: none !important;
        margin-right: 0 !important;
        text-align: center;
    }

    .uk-form-label, .uk-input, .uk-select {
        width: 100%;
        display: block;
    }

    .responsive-table thead { display: none; }
    .responsive-table td {
        display: block;
        text-align: right;
    }
    
    body {
        overflow-x: hidden;
        width: 100%;
    }
}