/* =========================================================
   CATÁLOGO DE CAPTURAS - ventana "Ver proyecto"
   (prefijo mc- para no chocar con estilos de main.css)
   ========================================================= */
.ph-media { cursor: pointer; }
.ph-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #2563eb;
    font-family: inherit;
    font-weight: 700;
    font-size: .95rem;
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .2s ease;
}
.ph-open:hover { transform: scale(1.05); }

html.mc-lock, html.mc-lock body { overflow: hidden; }

/* La ventana completa se desplaza con la rueda del mouse */
.mc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 40px 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
    font-family: 'Inter', sans-serif;
}
.mc-modal.mc-open { opacity: 1; visibility: visible; pointer-events: auto; }

/* Color de los laterales (fondo detrás de la ventana).
   Para cambiarlo, edita solo esta variable. */
.mc-modal {
    --mc-fondo: linear-gradient(135deg, rgba(219, 234, 254, .93) 0%, rgba(224, 242, 254, .93) 50%, rgba(237, 233, 254, .93) 100%);
}
.mc-backdrop {
    position: fixed;
    inset: 0;
    background: var(--mc-fondo);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Botón cerrar: siempre visible arriba a la derecha */
.mc-close {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #0f172a;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.mc-close:hover { background: #f1f5f9; }

.mc-box {
    position: relative;
    width: min(1200px, 100%);
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform .25s ease;
}
.mc-modal.mc-open .mc-box { transform: none; }

/* Captura grande, a todo lo ancho, sin franjas */
.mc-viewer {
    position: relative;
    background: #f1f5f9;
    line-height: 0;
    text-align: center;
}
.mc-img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 78vh;
}
.mc-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #0f172a;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.mc-nav:hover { background: #fff; }
.mc-prev { left: 16px; }
.mc-next { right: 16px; }
.mc-counter {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    padding: 7px 14px;
    border-radius: 999px;
}

/* Miniaturas debajo de la captura */
.mc-thumbs {
    display: flex;
    gap: 10px;
    padding: 14px 28px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}
.mc-thumbs button {
    flex: 0 0 120px;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #e2e8f0;
    aspect-ratio: 16 / 10;
    opacity: .55;
    transition: opacity .2s ease, border-color .2s ease;
}
.mc-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-thumbs button:hover { opacity: 1; }
.mc-thumbs button.mc-active { opacity: 1; border-color: #2563eb; }

.mc-single .mc-nav,
.mc-single .mc-counter,
.mc-single .mc-thumbs { display: none; }

/* Información debajo */
.mc-info { padding: 28px 32px 34px; }
.mc-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.mc-tag {
    display: inline-block;
    background: #e0ecff;
    color: #1d4ed8;
    font-size: .78rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
}
.mc-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #0f172a;
    margin: 10px 0 4px;
}
.mc-caption { color: #2563eb; font-weight: 700; margin: 0; }
.mc-desc { color: #475569; line-height: 1.6; margin: 0 0 12px; }
.mc-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-tech span {
    font-size: .78rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 6px;
}

/* Reto / Solución / Impacto en 3 columnas */
.mc-case {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.mc-block {
    background: #f8fafc;
    border-top: 4px solid #2563eb;
    border-radius: 14px;
    padding: 18px 20px;
}
.mc-block h4 {
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2563eb;
    margin: 0 0 8px;
}
.mc-block p { color: #475569; line-height: 1.6; margin: 0 0 12px; font-size: .97rem; }
.mc-block.mc-reto { border-color: #f59e0b; }
.mc-block.mc-reto h4 { color: #b45309; }
.mc-block.mc-impacto { border-color: #10b981; }
.mc-block.mc-impacto h4 { color: #047857; }
.mc-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mc-block li {
    position: relative;
    padding-left: 24px;
    color: #0f172a;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.45;
}
.mc-block li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: #10b981;
    font-weight: 900;
}

.mc-visit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
    transition: transform .2s ease;
}
.mc-visit:hover { transform: translateY(-2px); color: #fff; }

/* Tablet */
@media (max-width: 900px) {
    .mc-case { grid-template-columns: 1fr; }
}

/* Celular */
@media (max-width: 600px) {
    .mc-modal { padding: 0; }
    .mc-box { border-radius: 0; min-height: 100%; }
    .mc-close { top: 10px; right: 10px; width: 40px; height: 40px; font-size: 1.7rem; }
    .mc-img { max-height: 60vh; }
    .mc-nav { width: 38px; height: 38px; font-size: 1.7rem; }
    .mc-prev { left: 8px; }
    .mc-next { right: 8px; }
    .mc-thumbs { padding: 10px 14px; }
    .mc-thumbs button { flex-basis: 84px; }
    .mc-info { padding: 20px 18px 30px; }
    .mc-title { font-size: 1.45rem; }
    .mc-visit { width: 100%; justify-content: center; }
}
