/* ==========================================================================
   WordPress + React additions for the Uriel Maksumov theme.
   (Design styles are in style.css, compiled from assets/scss.)
   ========================================================================== */

/* React mount points should not affect layout */
.um-react { display: contents; }

/* Skip link */
.um-skip { position: absolute; left: 16px; top: 16px; z-index: 1000; background: #fff; color: #002C48; padding: 10px 16px; border-radius: 8px; }

/* Admin bar: keep absolute header below it */
.admin-bar .mobile-menu-modal { top: 46px; }
@media (min-width: 783px) { .admin-bar .mobile-menu-modal { top: 32px; } }

/* Image logos */
.logo .um-logo-img { display: block; height: 40px; width: auto; max-width: 260px; object-fit: contain; }
.site-footer .logo .um-logo-img { height: 40px; }

/* -------- Video cards (Meditations page) -------- */
.video .embed { background-size: cover; background-position: center; }
.video .embed.has-poster::after { content: ""; position: absolute; inset: 0; background: rgba(0, 21, 35, 0.25); transition: background-color .25s ease; }
.video:hover .embed.has-poster::after { background: rgba(0, 21, 35, 0.1); }
.video .embed .play-lg { position: relative; z-index: 1; }
.video .embed video,
.video .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
.video.is-playing .embed { background: #000; }

/* -------- Popup video player (Home meditations) -------- */
html.um-modal-open { overflow: hidden; }
.um-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 21, 35, 0.88); display: flex; align-items: center; justify-content: center; padding: 24px; animation: umFade .2s ease; }
.um-modal__inner { position: relative; width: min(1100px, 100%); }
.um-modal__frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px rgba(0, 13, 26, .55); }
.um-modal__frame iframe,
.um-modal__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.um-modal__close { position: absolute; top: -52px; right: 0; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; transition: background-color .2s ease; }
.um-modal__close:hover { background: #3ECFF0; border-color: #3ECFF0; color: #002C48; }
.um-modal__title { margin-top: 16px; text-align: center; color: #fff; font-family: "Cormorant Garamond", serif; font-size: 26px; }
@keyframes umFade { from { opacity: 0; } to { opacity: 1; } }
.meditations .med-item { cursor: pointer; }

/* -------- Podcast players (Media page) -------- */
.pod-card .um-player-btn { width: 100%; border: 0; cursor: pointer; text-align: left; transition: background-color .2s ease; }
.pod-card .um-player-btn:hover { background: #00314F; }
.pod-card .um-player-btn:disabled { cursor: default; }
.pod-card a.player { color: inherit; }
.um-pod-live { border-radius: 14px; overflow: hidden; background: #002C48; }
.um-pod-live iframe { display: block; width: 100%; border: 0; }
.um-pod-live audio { display: block; width: 100%; padding: 10px; }
.um-pod-live.is-video { position: relative; aspect-ratio: 16 / 9; }
.um-pod-live.is-video iframe,
.um-pod-live.is-video video { position: absolute; inset: 0; width: 100%; height: 100%; }

/* -------- Forms -------- */
.um-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.contact-form, .form-card { position: relative; }
.um-form-status { margin-top: 18px; padding: 14px 18px; border-radius: 12px; font-size: 14px; line-height: 150%; }
.um-form-status.is-done { background: rgba(62, 207, 240, .14); color: #A9EAF8; border: 1px solid rgba(62, 207, 240, .4); }
.um-form-status.is-error { background: rgba(242, 90, 90, .12); color: #ffb4b4; border: 1px solid rgba(242, 90, 90, .4); }
.send-btn:disabled, .inquiry .send:disabled { opacity: .7; cursor: wait; }

/* Copy biography button state */
.bio .copy-btn.is-copied { background: #3ECFF0; border-color: #3ECFF0; color: #002C48; }

/* Publication / podcast images in the dashed slots */
.pub-card .img-slot:has(img), .img-slot.sm:has(img) { padding: 0; border: 0; background: none; }

/* -------- Default pages / posts -------- */
.um-simple-hero { padding-bottom: 80px; }
.um-content { max-width: 820px; margin: 0 auto; color: #56636F; font-size: 17px; line-height: 175%; }
.um-content > * + * { margin-top: 1.1em; }
.um-content h2, .um-content h3, .um-content h4 { font-family: "Cormorant Garamond", serif; color: #002C48; line-height: 120%; margin-top: 1.6em; }
.um-content h2 { font-size: 38px; }
.um-content h3 { font-size: 30px; }
.um-content a { color: #0B7E9D; text-decoration: underline; }
.um-content ul, .um-content ol { padding-left: 1.4em; list-style: revert; }
.um-content img { height: auto; border-radius: 12px; }
.um-content blockquote { border-left: 3px solid #3ECFF0; padding-left: 20px; font-family: "Cormorant Garamond", serif; font-size: 24px; color: #002C48; }
.um-featured { width: 100%; height: auto; border-radius: 16px; margin-bottom: 32px; }
.um-card { background: #fff; border: 1px solid #DDE4E9; border-radius: 16px; padding: 24px; height: 100%; }
.um-card img { width: 100%; height: auto; border-radius: 12px; margin-bottom: 16px; }
.um-card-date { font-size: 13px; color: #0B7E9D; }
.um-card h2 { font-family: "Cormorant Garamond", serif; font-size: 28px; margin: 8px 0 12px; }
.um-card h2 a { color: #002C48; }
.um-pagination { margin-top: 40px; text-align: center; }
.um-pagination .page-numbers { display: inline-block; padding: 6px 12px; color: #002C48; }
.um-pagination .current { color: #0B7E9D; font-weight: 600; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 14px; color: #8FA8BA; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Book page — Gallery & videos
   ========================================================================== */
.book-gallery { --pt: 130px; --pb: 130px; }
.book-gallery .bm-head { margin-bottom: 52px; }
.book-gallery .h { font-family: "Cormorant Garamond", serif; font-size: 62px; font-weight: 300; line-height: 104%; color: #002C48; margin: 14px 0 0; }
.book-gallery .sub { font-family: "Cormorant Garamond", serif; font-size: 26px; font-style: italic; font-weight: 300; line-height: 130%; color: #0B7E9D; margin: 0; }
@media (max-width: 991px) { .book-gallery .h { font-size: 48px; } }
@media (max-width: 767px) { .book-gallery .h { font-size: 40px; } .book-gallery .sub { font-size: 22px; } .book-gallery .bm-head { margin-bottom: 36px; } }

.bm-wrap { display: flex; flex-direction: column; gap: 40px; }
.bm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
@media (max-width: 767px) { .bm-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Images */
.bm-image { margin: 0; }
.bm-image__box { position: relative; border-radius: 20px; overflow: hidden; background: #DDE4E9; box-shadow: 0 30px 60px rgba(0, 43, 71, .10); }
.bm-image__link { position: relative; display: block; aspect-ratio: 16 / 9; cursor: pointer; }
.bm-image__link.is-zoom { cursor: zoom-in; }
.bm-image__link img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.1s cubic-bezier(.22,.61,.36,1); }
.bm-image__link:hover img { scale: 1.04; }
.bm-zoom { position: absolute; z-index: 2; right: 16px; bottom: 16px; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #002C48; display: flex; align-items: center; justify-content: center; cursor: zoom-in; opacity: 0; translate: 0 6px; transition: opacity .3s ease, translate .3s ease, background-color .2s ease; }
.bm-image__box:hover .bm-zoom, .bm-zoom:focus-visible { opacity: 1; translate: 0 0; }
.bm-zoom:hover { background: #3ECFF0; }
@media (hover: none) { .bm-zoom { opacity: 1; translate: 0 0; } }
.bm-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 18px; }
.bm-meta .bm-caption { margin: 0; }
.bm-buy { white-space: nowrap; }
.um-modal__title .bm-buy { display: inline-flex; margin: 14px auto 0; font-family: "Inter", sans-serif; }
.um-modal__title .bm-count { margin-top: 10px; }
.bm-caption { margin: 14px 0 0; font-family: "Inter", sans-serif; font-size: 14px; line-height: 150%; color: #56636F; }

/* Videos */
.bm-video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, #002C48, #0B7E9D); box-shadow: 0 30px 60px rgba(0, 43, 71, .12); }
.bm-video__frame > video, .bm-video__frame > iframe, .bm-video__frame .um-video-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
.bm-video__poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; display: block; }
.bm-video__poster img, .bm-video__poster video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: scale 1.1s cubic-bezier(.22,.61,.36,1); }
.bm-video__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,21,35,0) 40%, rgba(0,21,35,.45) 100%); transition: background-color .3s ease; }
.bm-video__poster:hover img, .bm-video__poster:hover video { scale: 1.04; }
.bm-play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: #3ECFF0; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px rgba(62, 207, 240, .25); transition: scale .3s ease, box-shadow .3s ease; }
.bm-play i { width: 20px; height: 18px; margin-left: 4px; background: #002C48; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.bm-video__poster:hover .bm-play, .bm-video__poster:focus-visible .bm-play { scale: 1.08; box-shadow: 0 0 0 16px rgba(62, 207, 240, .18); }
.bm-video__title { margin: 18px 0 0; font-family: "Cormorant Garamond", serif; font-size: 28px; font-weight: 400; line-height: 115%; color: #002C48; }
.bm-video__title + .bm-caption { margin-top: 6px; }
@media (max-width: 767px) { .bm-play { width: 62px; height: 62px; margin: -31px 0 0 -31px; } .bm-video__title { font-size: 24px; } }

/* Empty video slot (editors only) */
.bm-empty { background: #E3F4F9; border: 1px dashed rgba(62, 207, 240, .7); box-shadow: none; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.bm-empty > span { display: flex; flex-direction: column; gap: 6px; font-family: "Inter", sans-serif; font-size: 14px; color: #56636F; }
.bm-empty b { color: #0B7E9D; font-weight: 600; }
.bm-empty a { color: #002C48; font-weight: 600; text-decoration: underline; }
.bm-empty small { font-size: 12px; color: #8FA8BA; }

/* Lightbox */
.bm-lightbox .um-modal__inner { width: auto; max-width: min(1400px, 100%); }
.bm-lightbox__img { display: block; max-width: 100%; max-height: calc(100vh - 160px); width: auto; height: auto; margin: 0 auto; border-radius: 14px; box-shadow: 0 40px 80px rgba(0, 13, 26, .55); }
.bm-count { display: block; margin-top: 4px; font-family: "Inter", sans-serif; font-size: 13px; color: #B9C8D3; }
.bm-nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(0, 21, 35, .55); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background-color .2s ease; }
.bm-nav:hover { background: #3ECFF0; border-color: #3ECFF0; color: #002C48; }
.bm-prev { left: 14px; }
.bm-next { right: 14px; }

/* Full-width cover image section */
.book-cover-image img { display: block; width: 100%; height: auto; }
