.mdmi-theme-video{display:flex;justify-content:center;align-items:center;padding:18px 12px 24px;box-sizing:border-box;width:100%;}
.mdmi-theme-video .mdmi-theme-play{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid #a6d5df;border-radius:999px;padding:12px 22px;background:#e0f1f4;color:#245e70;font:600 15px/1.3 Montserrat,system-ui,sans-serif;cursor:pointer;animation:mdmi-video-float 2.6s ease-in-out infinite;box-shadow:0 3px 8px #245e7014;}
.mdmi-theme-play-icon{font-size:17px;line-height:1;}
@keyframes mdmi-video-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.mdmi-theme-video .mdmi-theme-play:hover,.mdmi-theme-video .mdmi-theme-play:focus-visible{animation-play-state:paused;background:#cde9ef;color:#245e70;}
@media(prefers-reduced-motion:reduce){.mdmi-theme-video .mdmi-theme-play{animation:none}}
.mdmi-video-dialog{position:fixed;inset:0;margin:auto;padding:42px 12px 12px;border:0;border-radius:14px;background:#17232b;color:white;width:min(850px,94vw);max-width:94vw;max-height:94vh;box-sizing:border-box;overflow:auto;z-index:999999;}
.mdmi-video-dialog::backdrop{background:#000b;}
.mdmi-video-dialog.mdmi-vertical{width:min(380px,94vw,calc((90vh - 54px)*9/16 + 24px));}
.mdmi-video-dialog iframe,.mdmi-video-dialog video{display:block;width:100%;aspect-ratio:16/9;max-height:80vh;border:0;background:#000;object-fit:contain;}
.mdmi-video-dialog.mdmi-vertical iframe,.mdmi-video-dialog.mdmi-vertical video{aspect-ratio:9/16;}
.mdmi-video-dialog .mdmi-video-close{position:absolute;right:10px;top:5px;border:0;background:transparent;color:white;font-size:26px;line-height:1;padding:4px 8px;cursor:pointer;}

/* 1.9.6: thematic pages only; preserve gallery geometry and footer. */
.mdmt,.mdm-page.mdm-auto-page:not(.mdm-home),.mdm-page.mdm-global-content:has(.mdmt),.mdm-global-page-content:has(.mdmt){background:#fff!important;height:auto!important;min-height:0!important;max-height:none!important;}
.mdm-page.mdm-auto-page:not(.mdm-home)::before,.mdm-page.mdm-global-content:has(.mdmt)::before{display:none!important;}
.mdmt{padding-bottom:25px!important;}
.mdmt:has(.mdmi-theme-video){padding-bottom:0!important;}
.mdm-page.mdm-auto-page:not(.mdm-home) .mdm-gallery-section{padding-bottom:25px!important;}
.mdm-page.mdm-auto-page:not(.mdm-home):has(.mdmi-theme-video) .mdm-gallery-section{padding-bottom:0!important;}
.mdmi-theme-video{padding-bottom:25px!important;}
:is(.elementor-widget,.elementor-widget-container,.elementor-shortcode,.e-con,.e-con-inner,.elementor-section,.elementor-column,.elementor-widget-wrap):has(.mdmt,.mdm-auto-page:not(.mdm-home)){height:auto!important;min-height:0!important;max-height:none!important;--min-height:0px;flex-grow:0!important;padding-bottom:0!important;margin-bottom:0!important;}
/* Decorative CSS bubbles, no extra media requests. */
:is(.mdmi-theme-play,.mdmi-special-button,.mdm-contact-button,.mdm-home-header-contact,.mdmi-home-animated){position:relative;overflow:visible!important;}
:is(.mdmi-theme-play,.mdmi-special-button,.mdm-contact-button,.mdm-home-header-contact,.mdmi-home-animated)::before,
:is(.mdmi-theme-play,.mdmi-special-button,.mdm-contact-button,.mdm-home-header-contact,.mdmi-home-animated)::after{content:'';position:absolute;pointer-events:none;bottom:70%;width:10px;height:10px;border:1px solid #80c7d8;border-radius:50%;background:#d8f4fa66;box-shadow:15px 13px 0 -2px #a8dce688;animation:mdmi-bubble-rise 3s ease-out infinite;opacity:0;left:12%;}
:is(.mdmi-theme-play,.mdmi-special-button,.mdm-contact-button,.mdm-home-header-contact,.mdmi-home-animated)::after{left:82%;width:14px;height:14px;animation-delay:1.5s;}
@keyframes mdmi-bubble-rise{0%{transform:translateY(0) scale(.5);opacity:0}20%{opacity:.85}75%{opacity:.65}100%{transform:translate(5px,-35px) scale(1.1);opacity:0}}
@media(prefers-reduced-motion:reduce){:is(.mdmi-theme-play,.mdmi-special-button,.mdm-contact-button,.mdm-home-header-contact,.mdmi-home-animated)::before,:is(.mdmi-theme-play,.mdmi-special-button,.mdm-contact-button,.mdm-home-header-contact,.mdmi-home-animated)::after{animation:none!important;display:none!important;}}

/* Theme-only outer layout, including the canvas outside the shortcode. */
body:has(.mdmt,.mdm-auto-page:not(.mdm-home)),body:has(.mdmt,.mdm-auto-page:not(.mdm-home)) :is(#page,#content,#primary,#main,.site-content,.ast-container){background:#fff!important;min-height:0!important;height:auto!important;}
.mdm-global-page-content:has(.mdmt){background:#fff!important;padding-bottom:0!important;margin-bottom:0!important;}
.mdm-page.mdm-global-content:has(.mdmt),.mdm-page.mdm-auto-page:not(.mdm-home){padding-bottom:0!important;margin-bottom:0!important;--mdm-sand:#fff!important;--mdm-paper-wash:#fff!important;}
.mdmt,.mdm-global-page-content:has(.mdmt){flex:0 0 auto!important;}
body:has(.mdmt,.mdm-auto-page:not(.mdm-home)) .mdm-zocalo{margin-top:0!important;}
.mdmi-home-animated,.mdmi-special-button{animation:mdmi-video-float 2.6s ease-in-out infinite;}
@media(prefers-reduced-motion:reduce){.mdmi-home-animated,.mdmi-special-button{animation:none!important;}}
