/* Blog / fichas — verdes corporativos YTSmed (#23a455) */

.ytsmed-guide-downloads,
.ytsmed-product-guide-link,
.ytsmed-blog-cta {
    --ytsmed-green: #23a455;
    --ytsmed-green-dark: #1e8f4a;
    --ytsmed-green-light: #e8f7ee;
    --ytsmed-green-mid: #268f5c;
}

/* Descarga PDF guía mantenimiento — botones compactos */

.ytsmed-guide-downloads {
    margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.1rem;
    font-family: Montserrat, system-ui, sans-serif;
    background: var(--ytsmed-green-light, #e8f7ee);
    border: 1px solid #c5e8d4;
    border-left: 3px solid var(--ytsmed-green, #23a455);
    border-radius: 8px;
}

.ytsmed-guide-downloads__title {
    margin: 0 0 0.35rem;
    color: var(--ytsmed-green-dark, #1e8f4a);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.ytsmed-guide-downloads__intro {
    margin: 0 0 0.75rem;
    color: #555;
    font-size: 0.84rem;
    line-height: 1.45;
}

.ytsmed-guide-downloads__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.ytsmed-download-btn {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.45rem 0.75rem;
    color: #383838 !important;
    font-size: 0.82rem;
    line-height: 1.3;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid #c5e8d4;
    border-radius: 6px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ytsmed-download-btn:hover,
.ytsmed-download-btn:focus-visible {
    color: #383838 !important;
    text-decoration: none !important;
    background: #f0faf4;
    border-color: var(--ytsmed-green, #23a455);
    outline: none;
}

.ytsmed-download-btn__region {
    color: var(--ytsmed-green-dark, #1e8f4a);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none !important;
}

.ytsmed-download-btn__text {
    font-weight: 600;
    text-decoration: none !important;
}

.ytsmed-download-btn__badge {
    padding: 0.1rem 0.45rem;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    background: var(--ytsmed-green, #23a455);
    border-radius: 4px;
}

.ytsmed-guide-downloads__note {
    margin: 0.65rem 0 0;
    color: #666;
    font-size: 0.78rem;
    line-height: 1.4;
}

/* Bloques Valencia vs resto España */

.ytsmed-mant-ubicacion {
    margin: 1.75rem 0;
    --ytsmed-green: #23a455;
    --ytsmed-green-mid: #268f5c;
}

.ytsmed-mant-ubicacion h2 {
    margin-bottom: 0.85rem;
    font-size: 1.15rem;
}

.ytsmed-mant-ubicacion__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.85rem;
}

.ytsmed-mant-ubicacion__card {
    padding: 1rem 1.1rem;
    background: #ffffff;
    border: 1px solid #e2e8ee;
    border-radius: 8px;
}

.ytsmed-mant-ubicacion__card--cv {
    border-left: 3px solid var(--ytsmed-green, #23a455);
}

.ytsmed-mant-ubicacion__card--esp {
    border-left: 3px solid var(--ytsmed-green-mid, #268f5c);
}

.ytsmed-mant-ubicacion__card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.98rem;
}

.ytsmed-mant-ubicacion__card p {
    margin: 0 0 0.6rem;
    font-size: 0.88rem;
    line-height: 1.45;
}

.ytsmed-mant-ubicacion__card ul {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Enlace a guía blog en fichas de producto */

.ytsmed-product-guide-link {
    margin: 1rem 0 1.25rem;
    padding: 0.9rem 1rem;
    font-family: Montserrat, system-ui, sans-serif;
    background: var(--ytsmed-green-light, #e8f7ee);
    border: 1px solid #c5e8d4;
    border-left: 3px solid var(--ytsmed-green, #23a455);
    border-radius: 8px;
}

.ytsmed-product-guide-link__label {
    margin: 0 0 0.25rem;
    color: var(--ytsmed-green-dark, #1e8f4a);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ytsmed-product-guide-link__text {
    margin: 0 0 0.65rem;
    color: #383838;
    font-size: 0.86rem;
    line-height: 1.45;
}

.ytsmed-product-guide-link__btn {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
    background: var(--ytsmed-green, #23a455);
    border-radius: 5px;
}

.ytsmed-product-guide-link__btn:hover,
.ytsmed-product-guide-link__btn:focus-visible {
    color: #ffffff !important;
    text-decoration: none !important;
    background: var(--ytsmed-green-dark, #1e8f4a);
    outline: none;
}

/* CTA compacto en artículos del blog */

.ytsmed-blog-post-end {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
}

.ytsmed-blog-cta {
    margin: 2rem 0 6rem;
    padding: 1rem 1.1rem 1.1rem;
    font-family: Montserrat, system-ui, sans-serif;
    background: #f3faf5;
    border: 1px solid #c5e8d4;
    border-radius: 8px;
}

.ytsmed-blog-cta__title {
    margin: 0 0 0.6rem;
    color: #1e8f4a;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.ytsmed-blog-cta__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ytsmed-blog-cta__list li {
    margin: 0;
    padding: 0;
    border-top: 1px solid #dceee3;
}

.ytsmed-blog-cta__list li:first-child {
    border-top: none;
}

.ytsmed-blog-cta__list a {
    display: block;
    padding: 0.5rem 0.15rem;
    color: #383838 !important;
    font-size: 0.84rem;
    line-height: 1.4;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.ytsmed-blog-cta__list a:hover,
.ytsmed-blog-cta__list a:focus-visible {
    color: #1e8f4a !important;
    text-decoration: none !important;
    outline: none;
}

.ytsmed-blog-cta__hint {
    margin: 0.6rem 0 0;
    color: #666;
    font-size: 0.78rem;
    line-height: 1.4;
}

/* Compatibilidad: grid antiguo si queda en alguna página */
.ytsmed-blog-cta__grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ytsmed-blog-cta__card {
    display: block;
    padding: 0.5rem 0.65rem;
    color: #383838 !important;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid #dceee3;
    border-radius: 6px;
    font-size: 0.84rem;
    line-height: 1.35;
}

.ytsmed-blog-cta__card:hover {
    color: #1e8f4a !important;
    text-decoration: none !important;
    border-color: #23a455;
}

.ytsmed-blog-cta__name,
.ytsmed-blog-cta__price {
    display: inline;
    font-size: inherit;
    font-weight: 600;
    text-decoration: none !important;
}

.ytsmed-blog-cta__price {
    color: #23a455;
}

.ytsmed-blog-cta__price::before {
    content: " — ";
}

/* Aire antes del footer del sitio */
.single-post .entry-content .ytsmed-blog-cta,
.post .entry-content .ytsmed-blog-cta {
    margin-bottom: 7rem;
}

.single-post .entry-content .ytsmed-blog-post-end,
.post .entry-content .ytsmed-blog-post-end {
    margin-bottom: 5rem;
    padding-bottom: 3rem;
}

/* Grid productos en blog (tipo tienda / Elementor) */

.ytsmed-blog-products {
    margin: 1.75rem 0 2rem;
    font-family: Montserrat, system-ui, sans-serif;
}

.ytsmed-blog-products__title {
    margin: 0 0 1rem;
    color: var(--ytsmed-green-dark, #1e8f4a);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.ytsmed-blog-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.ytsmed-blog-product {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 0.75rem 0.9rem;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ytsmed-blog-product__image {
    display: block;
    margin: 0 auto 0.65rem;
    text-decoration: none !important;
}

.ytsmed-blog-product__image img,
.ytsmed-blog-product__img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 130px;
    margin: 0 auto;
    object-fit: contain;
}

.ytsmed-blog-product__name {
    margin: 0 0 0.4rem;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
}

.ytsmed-blog-product__name a {
    color: #383838 !important;
    text-decoration: none !important;
}

.ytsmed-blog-product__name a:hover {
    color: var(--ytsmed-green-dark, #1e8f4a) !important;
}

.ytsmed-blog-product__price {
    margin: 0 0 0.75rem;
    color: #383838;
    font-size: 0.8rem;
    line-height: 1.4;
}

.ytsmed-blog-product__price del {
    opacity: 0.65;
}

.ytsmed-blog-product__price ins {
    text-decoration: none;
    font-weight: 700;
}

.ytsmed-blog-product__price .woocommerce-price-suffix {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: #666;
}

.ytsmed-blog-product__cart {
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 0.55rem 0.65rem !important;
    color: #ffffff !important;
    font-family: Montserrat, system-ui, sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center;
    text-decoration: none !important;
    background: var(--ytsmed-green, #23a455) !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ytsmed-blog-product__cart:hover,
.ytsmed-blog-product__cart:focus-visible {
    color: #ffffff !important;
    text-decoration: none !important;
    background: var(--ytsmed-green-dark, #1e8f4a) !important;
    outline: none;
}

.ytsmed-blog-product__cart--view {
    background: #ffffff !important;
    color: var(--ytsmed-green-dark, #1e8f4a) !important;
    border: 1px solid var(--ytsmed-green, #23a455) !important;
}

.ytsmed-blog-product__cart--view:hover {
    background: var(--ytsmed-green-light, #e8f7ee) !important;
    color: var(--ytsmed-green-dark, #1e8f4a) !important;
}

@media (max-width: 640px) {
    .ytsmed-blog-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .ytsmed-blog-cta {
        margin: 1.5rem 0 4.5rem;
    }

    .single-post .entry-content .ytsmed-blog-cta,
    .post .entry-content .ytsmed-blog-cta {
        margin-bottom: 5rem;
    }

    .ytsmed-download-btn {
        width: 100%;
    }
}
