/* HERO */

.mcd-hero {
    height: 520px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.mcd-hero-profile {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
}

.mcd-hero-profile img {
    width: 360px;
    height: 360px;
    object-fit: cover;
    border-radius: 16px;
    border: 6px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,.2);
}

.mcd-hero-overlay {
    position:absolute;
    inset:0;
    background:linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,.1));
}

.mcd-hero-date {
    position:absolute;
    bottom:20px;
    right:30px;
    background:white;
    padding:8px 14px;
    border-radius:20px;
    font-size:14px;
    font-weight:600;
    box-shadow:0 4px 12px rgba(0,0,0,.2);
}

.mcd-hero-rating {
    position:absolute;
    bottom:20px;
    left:30px;
    color:white;
    font-size:18px;
}

.mcd-rating-box {
    background: transparent;
    padding: 40px 20px 20px 20px;
    text-align: center;
    position: relative;
}

.mcd-rating-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, transparent, #1c2851, transparent);
    opacity: 0.2;
}

/* Estrellas vacías */
.mcd-stars-input i.fa-regular {
    color: #d5d5d5;
}

/* Estrellas activas */
.mcd-stars-input i.fa-solid {
    color: #ffc107;
    text-shadow: 0 0 6px rgba(255,193,7,0.5);
}

/* Hover */
.mcd-stars-input i {
    font-size: 30px;
    cursor: pointer;
    transition: all .25s ease;
}

.mcd-stars-input i:hover {
    transform: scale(1.25);
}

.mcd-stars-input i.glow {
    text-shadow: 0 0 8px rgba(255,193,7,0.7);
}

@keyframes starPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.5); }
    60%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.mcd-stars-input i.pop {
    animation: starPop .35s ease;
}

.mcd-hero-rating i.updated {
    animation: pop .3s ease;
}

.mcd-hero-rating i {
    color: #ffb400;
    margin-right: 3px;
    transition: transform .2s ease;
}

.mcd-hero-rating i:hover {
    transform: scale(1.2);
}
@media (max-width: 768px) {

    .mcd-hero {
        height: 380px;
    }

    /* Subimos fecha y rating */
    .mcd-hero-date {
        top: 15px;
        right: 15px;
        bottom: auto;
        font-size: 12px;
        padding: 6px 12px;
        margin-top:80px;
    }

    .mcd-hero-rating {
        top: 15px;
        left: 15px;
        bottom: auto;
        font-size: 14px;
        margin-top:80px;
    }

    /* Reducimos tamaño imagen perfil */
    .mcd-hero-profile img {
        width: 220px;
        height: 220px;
        border-width: 4px;
    }

}

/* Layout */

.mcd-container {
    max-width: 1200px;
    margin: 0 auto;
}

.mcd-layout {
    display: grid;
    gap: 40px;
}

/* Botones */

.mcd-btn {
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    margin-right: 10px;
}

.mcd-btn i {
    margin-right: 8px;
}

.mcd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mcd-btn.primary { background:#2e7d32; color:white; border: 2px solid #2e7d32;}
.mcd-btn.danger  { background:#c62828; color:white; border: 2px solid #c62828;}
.mcd-btn.outline { border:1px solid #c62828; background:white; color:#c62828; }

.mcd-btn-fav {
    border: 2px solid #dc3545;
    background: transparent;
    color: #dc3545;
}

.mcd-btn-fav i {
    color: #dc3545;
    transition: transform 0.2s ease;
}

.mcd-btn-fav:hover {
    background: #dc3545;
    color: #fff;
}

.mcd-btn-fav:hover i {
    color: #fff;
    transform: scale(1.15);
}

.centered {
    text-align:center;
}

.mcd-title {
    font-size:56px;
    margin:0;
    font-weight:800;
    color:#1a1146;
    text-align:center;
    margin-top: 20px;
}

@media (max-width: 768px) {

    .mcd-title {
        font-size: 34px;
        margin-top: 80px; /* más separación del hero */
        padding: 0 15px;
        line-height: 1.2;
    }

}

/*ACTIONS*/

@media (max-width: 768px) {

    .mcd-actions {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 25px;
    }

}

@media (max-width: 768px) {

    /* Ocultamos texto solo en secundarios */
    .mcd-actions .mcd-btn.danger .mcd-btn-text,
    .mcd-actions .mcd-btn-fav .mcd-fav-text {
        display: none;
    }

    /* Botones solo icono */
    .mcd-actions .mcd-btn.danger,
    .mcd-actions .mcd-btn-fav {
        padding: 12px;
        width: 48px;
        height: 48px;
        justify-content: center;
    }

    .mcd-actions .mcd-btn.danger i,
    .mcd-actions .mcd-btn-fav i {
        margin: 0;
    }

}

/* ===== STATS INLINE ===== */

.mcd-stats-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.mcd-stat-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
}

.mcd-stat-inline i {
    font-size: 16px;
}

/* etiqueta gris */
.mcd-stat-inline .label {
    color: #666;
}

/* valor en negrita */
.mcd-stat-inline strong {
    font-weight: 600;
    color: #000;
}

/* separador vertical */
.mcd-divider {
    width: 1px;
    height: 18px;
    background: #ddd;
}

/* DIFICULTAD */

.mcd-stat-inline.dificultad.facil i,
.mcd-stat-inline.dificultad.facil strong {
    color: #2e7d32;
}

.mcd-stat-inline.dificultad.media i,
.mcd-stat-inline.dificultad.media strong {
    color: #f9a825;
}

.mcd-stat-inline.dificultad.dificil i,
.mcd-stat-inline.dificil strong {
    color: #c62828;
}

/* ===== Layout general ===== */

.mcd-receta-wrapper {
    background: #f8f9fa;
}

.mcd-layout {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Contenido principal full width */
.mcd-main-full {
    width: 100%;
}

/* ===== Contenido Gutenberg ===== */

.mcd-content {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.mcd-content h2,
.mcd-content h3,
.mcd-content h4 {
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: 600;
}

.mcd-content p {
    margin-bottom: 20px;
}

.mcd-content img {
    border-radius: 12px;
    margin: 25px 0;
}

.mcd-content ul,
.mcd-content ol {
    margin: 20px 0 20px 20px;
}

/* QUOTE */
.mcd-content .wp-block-quote.mcd-quote {
    position: relative;
    background: #f5f7fb;
    border-left: 6px solid #1c2851;
    padding: 30px 30px 30px 40px;
    margin: 40px 0;
    border-radius: 8px;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #2c2c2c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Sección receta destacada */

.mcd-receta-card {
    padding: 80px 20px;
    background: #f3f6fb;
}

.mcd-receta-card-grid {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: 350px 1fr 180px;
    gap: 50px;
    align-items: center;
}

/* Imagen */

.mcd-receta-card-image img {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Contenido */

.mcd-receta-card-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #1d1b4b;
}

.mcd-receta-card-author {
    margin-bottom: 25px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcd-receta-card-author i {
    color: #1d1b4b;
}

/* Botones */

.mcd-receta-card-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Región */

.mcd-receta-card-region {
    text-align: center;
}

.mcd-receta-card-region img {
    width: 100%;
    max-width: 160px;
    border-radius: 12px;
    transition: transform .3s ease;
}

.mcd-receta-card-region img:hover {
    transform: scale(1.05);
}

.mcd-region-badge {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1b4b;
    opacity: .8;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {

    .mcd-receta-card-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .mcd-receta-card-actions {
        justify-content: center;
    }

    .mcd-receta-card-region img {
        max-width: 140px;
    }

}

@media (max-width: 768px) {
    .mcd-receta-card {
        margin-bottom: 20px;
    }
    
    .mcd-receta-card-region img {
        width: 140px;
        margin: 0 auto;
        display: block;
    }
    
    .mcd-receta-card-author {
        justify-content: center;
        text-align: center;
    }
    
    .mcd-receta-card-content {
        text-align: center;
    }

}

/* ============================= */
/* SECCIÓN STATS RECETA */
/* ============================= */

.mcd-receta-stats {
    padding: 70px 20px;
    background: linear-gradient(
        180deg,
        #1c2851 0%,
        #162044 60%,
        #0f1836 100%
    );
    border-radius:10px;
    margin-top:20px;
}

.mcd-stats-grid {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
    text-align: center;
}

.mcd-stat {
    padding: 25px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Iconos */
.mcd-stat i {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 10px;
    opacity: 0.85;
}

/* Labels */
.mcd-stat-label {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}

/* Valores */
.mcd-stat-value {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
}

/* Highlight tiempo total */
.mcd-stat-highlight {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
}

/* Dificultad colores */
.mcd-dificultad-baja {
    color: #66bb6a;
}

.mcd-dificultad-media {
    color: #ffca28;
}

.mcd-dificultad-alta {
    color: #ef5350;
}

.mcd-stat:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.05);
}

/* ============================= */
/* SECCIÓN DESCRIPCIÓN */
/* ============================= */

.mcd-receta-detalle-content {
    padding: 10px 20px;
    background: #ffffff;
}

.mcd-section-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #1d1b4b;
    font-weight: 600;
}

.mcd-receta-descripcion {
    margin-bottom: 40px;
}

.mcd-descripcion-content {
    color: #495057;
    line-height: 1.7;
    font-size: 15px;
}

/* ============================= */
/* INGREDIENTES */
/* ============================= */

.mcd-receta-ingredientes {
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.mcd-ingredientes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mcd-ingredientes-help {
    font-size: 13px;
    color: #6c757d;
}

.mcd-ingredientes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mcd-ingrediente-item {
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.mcd-ingrediente-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.mcd-ingrediente-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1d1b4b;
    cursor: pointer;
}

/* Texto */
.mcd-ingrediente-item span {
    transition: all 0.2s ease;
}

/* Estado marcado (controlado por JS) */
.mcd-ingrediente-item.is-checked span {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Fondo suave cuando está marcado */
.mcd-ingrediente-item.is-checked {
    background: #eef2ff;
    padding: 8px 12px;
    border-radius: 8px;
}

/* ============================= */
/* PASOS */
/* ============================= */

.mcd-receta-pasos {
    padding: 10px 20px;
    background: #f3f6fb;
}

.mcd-pasos-help {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 25px;
}

.mcd-pasos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mcd-paso-item {
    display: flex;
    gap: 18px;
    padding: 18px 20px;
    margin-bottom: 15px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e6ebf1;
    transition: all 0.25s ease;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
}

.mcd-paso-item:hover {
    border-color: #1d1b4b;
}

.mcd-paso-num {
    width: 30px;
    height: 30px;
    background: #1d1b4b;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.2s ease;
}

.mcd-paso-content p {
    margin: 0 0 6px;
    color: #343a40;
    line-height: 1.5;
}

.mcd-paso-consejo {
    font-size: 13px;
    color: #6c757d;
    border-left: 3px solid #1d1b4b;
    padding-left: 10px;
}

/* Paso completado */

.mcd-paso-item.completed {
    background: #f0f7f4;
    border-color: #2e7d32;
}

.mcd-paso-item.completed .mcd-paso-num {
    background: #2e7d32;
}

.mcd-paso-item.completed p {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Paso bloqueado */

.mcd-paso-item.locked {
    opacity: 0.5;
}

.mcd-paso-item.locked::after {
    content: "Completa el paso anterior primero";
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 12px;
    color: #dc3545;
}

/* ============================= */
/* NOTA FINAL */
/* ============================= */

.mcd-receta-nota-final {
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 20px 25px;
    background: #ffffff;
    border-left: 4px solid #1d1b4b;
    border-radius: 10px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.mcd-nota-icon {
    font-size: 20px;
    color: #1d1b4b;
    margin-top: 2px;
}

.mcd-nota-content h4 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #1d1b4b;
}

.mcd-nota-content p {
    margin: 0;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

/* ============================= */
/* VIDEO */
/* ============================= */

.mcd-receta-video {
    padding: 20px;
    background: #ffffff;
}

.mcd-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.mcd-video-wrapper iframe,
.mcd-video-wrapper embed,
.mcd-video-wrapper object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================= */
/* HIGHLIGHT ANIMADO */
/* ============================= */

#mcd-receta-info {
    transition: all 0.4s ease;
    position: relative;
}

.mcd-highlight {
    animation: mcdHighlight 1.2s ease forwards;
}

@keyframes mcdHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(29, 27, 75, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(29, 27, 75, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(29, 27, 75, 0);
    }
}

/* FAVORITOS ACTIVO */

.mcd-btn.mcd-fav-btn.active {
    background: #dc3545;
    color: #fff;
}

.mcd-btn.mcd-fav-btn.active i {
    color: #fff;
}

/* ============================= */
/* FAVORITOS GRID */
/* ============================= */

.mcd-favoritos-wrapper {
    padding: 80px 20px;
}

.mcd-favoritos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
    gap: 30px;
    margin-top: 40px;
}

.mcd-fav-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.mcd-fav-card:hover {
    transform: translateY(-5px);
}

.mcd-fav-card-img {
    position: relative;
}

.mcd-fav-card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.mcd-fav-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc3545;
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heartbeat 1.2s infinite;
}

.mcd-fav-card-body {
    padding: 20px;
}

.mcd-fav-card-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.mcd-fav-card-body p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}

.mcd-favoritos-empty {
    text-align: center;
    margin-top: 60px;
    font-size: 16px;
    color: #6c757d;
}

/* ============================= */
/* ANIMACIÓN LATIDO */
/* ============================= */

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    40% { transform: scale(1); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ============================= */
/* FAVORITOS REDISEÑO */
/* ============================= */

.mcd-favoritos-section {
    padding: 120px 20px 80px 20px; /* margen superior más amplio */
    background: #f4f6fb;
    min-height: 70vh;
}

.mcd-favoritos-header {
    margin-bottom: 50px;
    text-align: center;
}

.mcd-favoritos-header h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #1d1b4b;
}

.mcd-favoritos-header p {
    color: #6c757d;
    font-size: 16px;
}

.mcd-favoritos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 1100px) {
    .mcd-favoritos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .mcd-favoritos-grid {
        grid-template-columns: 1fr;
    }
}

.mcd-fav-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mcd-fav-card:hover {
    transform: translateY(-6px);
}

.mcd-fav-card-img {
    position: relative;
}

.mcd-fav-card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.mcd-fav-remove {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: none !important;

    font-size: 22px;
    color: #e10600; /* rojo fuerte elegante */
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* eliminar cualquier pseudo elemento del theme */
.mcd-fav-remove::before,
.mcd-fav-remove::after {
    display: none !important;
}

.mcd-fav-remove:hover {
    background: none !important;
    color: #ff2d2d;
    transform: scale(1.2);
}

.mcd-fav-card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mcd-fav-card-body h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1d1b4b;
    line-height: 1.3;
}

.mcd-fav-card-body p {
    font-size: 14px;
    color: #6c757d;
    flex: 1;
}

.mcd-fav-card-body .mcd-btn {
    margin-top: 22px;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, #1d1b4b, #2e2b70);
    color: #fff;
    text-decoration: none;
    transition: 0.3s ease;
}

.mcd-fav-card-body .mcd-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29,27,75,0.3);
}

.mcd-favoritos-empty {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.mcd-favoritos-empty p {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    font-size: 18px;
    color: #6c757d;
}

.mcd-fav-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mcd-fav-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.mcd-fav-card-img img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

/* ============================= */
/* PANEL SUPERIOR PRINT */
/* ============================= */

.mcd-print-controls {
    position: sticky;
    top: 0;
    background: #1c2851;
    color: #fff;
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Contenedor interno respetando ancho boxed */
.mcd-print-controls-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Instrucciones */
.mcd-print-instructions {
    text-align: center;
    font-size: 14px;
    opacity: .9;
}

/* Switches */
.mcd-print-switches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.mcd-print-switches label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.mcd-print-switches input[type="checkbox"] {
    accent-color: #ffc107;
    cursor: pointer;
}

/* Botón imprimir */
.mcd-print-btn {
    background: #ffc107;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    color: #000;
    transition: all .2s ease;
}

.mcd-print-btn:hover {
    background: #ffca2c;
}

/* ============================= */
/* OCULTAR CONTROLES AL IMPRIMIR */
/* ============================= */

@media print {

    .mcd-print-controls {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

}

/* ===================================== */
/* OCULTAR BOTONES EN MODO PRINT SCREEN */
/* ===================================== */

.mcd-print-body .mcd-actions {
    display: none !important;
}

/* Breadcrumbs */
.mcd-print-body .mcd-breadcrumb {
    display: none !important;
}

/* Bloque completo de acciones */
.mcd-print-body .mcd-actions {
    display: none !important;
}

/* Botón imprimir interno */
.mcd-print-body .mcd-btn.primary {
    display: none !important;
}

/* Botón favoritos */
.mcd-print-body .mcd-fav-btn {
    display: none !important;
}

/* Sistema de rating completo */
.mcd-print-body .mcd-rating-box,
.mcd-print-body .mcd-stars-input,
.mcd-print-body .mcd-rating-feedback {
    display: none !important;
}

/* Video */
.mcd-print-body [data-print-section="video"] {
    display: none !important;
}

/* ===================================== */
/* FORZAR VERSIÓN ESCRITORIO EN PRINT */
/* ===================================== */

@media print {

    /* Forzar ancho tipo desktop */
    @page {
        size: auto;
        margin: 20mm;
    }

    html, body {
        width: auto !important;
        margin: 0 !important;
    }

    /* Controlar ancho interno sin romper el papel */
    .mcd-container,
    .mcd-layout,
    .mcd-main-full {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .mcd-container,
    .mcd-layout,
    .mcd-main-full {
        max-width: 1100px !important;
        width: 1100px !important;
        margin: 0 auto !important;
    }

    /* Evitar que responsive apile todo */
    .mcd-receta-card-grid {
        grid-template-columns: 350px 1fr !important;
    }

    /* Hero recortado */
    .mcd-hero {
        height: 300px !important;
        background-size: cover !important;
        background-position: center !important;
    }

    /* Imagen perfil más pequeña */
    .mcd-hero-profile img {
        width: 220px !important;
        height: 220px !important;
    }

    /* Quitar overlays pesados */
    .mcd-hero-overlay {
        display: none !important;
    }

}

@media print {

    /* Permitir cortes más inteligentes */
    .mcd-receta-detalle,
    .mcd-container,
    .mcd-main-full,
    .mcd-receta-card,
    .mcd-receta-card-content,
    .mcd-receta-card-grid,
    .mcd-receta-pasos,
    .mcd-receta-descripcion {
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    /* Evitar que imágenes gigantes obliguen salto completo */
    img {
        max-height: 500px !important;
        height: auto !important;
    }

}

@media print {

    img {
        page-break-inside: auto !important;
        break-inside: auto !important;
    }

}

@media print {

    .mcd-receta-detalle-content {
        page-break-before: always;
        break-before: page;
    }

}

/* ===================================== */
/* MEMBRETE EN PANTALLA (print mode) */
/* ===================================== */

.mcd-print-letterhead {
    border-bottom: 2px solid #1c2851;
    padding: 20px 0 15px;
    margin-bottom: 30px;
}

.mcd-print-letterhead .mcd-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.mcd-print-letterhead img {
    max-height: 80px; /* más compacto en pantalla */
    width: auto;
    display: block;
}

/* ===================================== */
/* MEMBRETE EN IMPRESIÓN REAL */
/* ===================================== */

@media print {

    .mcd-print-letterhead {
        border-bottom: 1px solid #1c2851;
        padding: 10px 0 8px;
        margin-bottom: 20px;
    }

    .mcd-print-letterhead img {
        height: 60px !important;  /* control real de impresión */
        max-height: 60px !important;
        width: auto !important;
    }

}

/* Footer visible en pantalla print mode */
.mcd-print-footer {
    text-align: center;
    font-size: 12px;
    color: #444;
    margin-top: 50px;
}

/* Ajustes reales al imprimir */
@media print {

    @page {
        margin: 10mm;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
    }

}

@media print {

    .mcd-print-footer {
        position: static !important;
        display: block !important;
        margin-top: 40px !important;
        padding-top: 15px;
        border-top: 1px solid #ccc;
        text-align: center;
        font-size: 11px;
        color: #444;
        page-break-inside: avoid;
    }

}

.mcd-print-mode .mcd-print-letterhead {
    margin-top: 40px;
}

/* ===================================== */
/* SALTO DE PÁGINA PARA FICHA TÉCNICA */
/* ===================================== */

@media print {

    /* Forzar nueva página antes de la ficha */
    #mcd-receta-info {
        page-break-before: always;
        break-before: page;
    }

    /* Evitar que la card se parta */
    #mcd-receta-info,
    .mcd-receta-stats {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* También evitar que el grid se rompa */
    .mcd-receta-card-grid,
    .mcd-stats-grid {
        page-break-inside: avoid;
        break-inside: avoid;
    }

}

@media print {

    /* ========================= */
    /* INGREDIENTES */
    /* ========================= */

    /* Ocultar checkbox */
    .mcd-ingrediente-check {
        display: none !important;
    }

    /* Quitar estado visual */
    .mcd-ingrediente-item.is-checked,
    .mcd-ingrediente-item.is-checked span {
        text-decoration: none !important;
        opacity: 1 !important;
        color: #000 !important;
    }

    /* Forzar texto limpio */
    .mcd-ingrediente-item span {
        text-decoration: none !important;
        opacity: 1 !important;
        color: #000 !important;
    }

}

@media print {

    /* PASOS - eliminar cualquier estado visual */

    .mcd-paso-item,
    .mcd-paso-item * {
        text-decoration: none !important;
        opacity: 1 !important;
        color: #000 !important;
    }

    /* Quitar clase completed */
    .mcd-paso-item.completed,
    .mcd-paso-item.completed * {
        text-decoration: none !important;
        opacity: 1 !important;
    }

}