/* La Mistica post (Rome 2025) - Post-specific layout + gallery + lightbox
   Depends on:
   - /writing/writing-design.css
*/

.mistica-page {
    --mistica-gold: #c9a227;
}

.mistica-article .writing-prose blockquote {
    border-left-color: rgba(201, 162, 39, 0.72);
    border-color: rgba(201, 162, 39, 0.22);
    background: rgba(201, 162, 39, 0.10);
    color: rgba(255, 255, 255, 0.86);
}

.mistica-photo-grid {
    display: grid;
    gap: 1rem;
}

.mistica-photo-grid figure {
    margin: 0;
}

.mistica-photo-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    background: rgba(0, 0, 0, 0.18);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.mistica-photo-grid img:hover {
    transform: scale(1.01);
}

.mistica-photo-grid--2 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .mistica-photo-grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mistica-photo-grid--3 {
    grid-template-columns: 1fr;
}

@media (min-width: 760px) {
    .mistica-photo-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.mistica-photo-grid--tiles img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
}

@media (max-width: 640px) {
    .mistica-photo-grid--tiles img {
        aspect-ratio: 3 / 2;
    }
}

.mistica-photo-grid--contain img {
    aspect-ratio: auto;
    object-fit: contain;
    padding: 0.5rem;
    cursor: zoom-in;
}

.mistica-hero-img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 640px) {
    .mistica-hero-img {
        min-height: 300px;
        max-height: 360px;
    }
}

.mistica-hero-zoom-wrap {
    overflow: hidden;
    border-radius: 12px;
}

.mistica-hero-img--zoom {
    object-position: center 20%;
    transform: scale(1.35);
    transform-origin: center 25%;
}

.mistica-caption {
    margin: 0.75rem 0 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
}

.mistica-caption--small {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.52);
}

.mistica-caption a {
    color: rgba(147, 197, 253, 0.92);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.mistica-caption a:hover {
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.65);
}

@media (min-width: 640px) {
    .mistica-span-2 {
        grid-column: 1 / -1;
    }
}

.mistica-span-2 img {
    aspect-ratio: 16 / 9;
    object-position: center;
}

.mistica-photo-single {
    text-align: center;
}

.mistica-photo-single img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    cursor: zoom-in;
    transition: transform 0.2s ease;
    background: rgba(0, 0, 0, 0.18);
}

.mistica-photo-single img:hover {
    transform: scale(1.01);
}

.mistica-latin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
    margin: 1.75rem auto;
}

@media (min-width: 640px) {
    .mistica-latin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

.mistica-latin-latin {
    margin: 0;
    font-style: italic;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.86);
}

.mistica-latin-english {
    margin: 0.4rem 0 0 0;
    color: rgba(255, 255, 255, 0.60);
}

.mistica-panorama {
    height: 400px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
}

.mistica-panorama--tall {
    height: 500px;
}

@media (max-width: 640px) {
    .mistica-panorama {
        height: 340px;
    }

    .mistica-panorama--tall {
        height: 400px;
    }
}

.mistica-panorama-caption {
    text-align: center;
    margin: -1.2rem 0 2rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.60);
}

.mistica-closing {
    text-align: center;
    margin-top: 2.75rem;
    color: rgba(201, 162, 39, 0.95);
    font-weight: 850;
    font-size: 1.4rem;
    line-height: 1.6;
}

.mistica-tau {
    text-align: center;
    margin-top: 3.25rem;
    font-size: 2.8rem;
    color: rgba(255, 255, 255, 0.58);
}

/* Lightbox overlay */
.mistica-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.90);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mistica-lightbox.is-active {
    display: flex;
    opacity: 1;
}

.mistica-lightbox-img {
    max-width: 92%;
    max-height: 90vh;
    border-radius: 6px;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.55);
    transform: scale(0.94);
    transition: transform 0.25s ease;
}

.mistica-lightbox.is-active .mistica-lightbox-img {
    transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .mistica-photo-grid img,
    .mistica-photo-single img,
    .mistica-lightbox,
    .mistica-lightbox-img {
        transition: none;
    }
}
