/* oralmedicine.gr (static). What Elementor's scripts used to do in the browser, done here with CSS
   (and site.js); elementor.css is the old site's own stylesheets, unchanged. */

/* header: Elementor "sticky" (site.js fixes it to the top and leaves a spacer of the same height) */
.elementor-sticky--active { z-index: 99; }

/* menu: SmartMenus opened the sub-menu on hover */
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:hover > ul,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:focus-within > ul { display: block; }
/* the sub-menu is as wide as its longest item (SmartMenus measured it; the stylesheet alone fixes 12em,
   so long names spilled out of the white box) and opens leftwards from the item, so it never leaves the screen */
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children > ul { top: auto; left: auto; right: 0;
  width: max-content; min-width: 12em; max-width: calc(100vw - 32px); }
/* elementor.css pins the sub-menu's left edge with !important (SmartMenus then moved it in the browser) */
.elementor-nav-menu--main .elementor-nav-menu > li.menu-item-has-children:not(:first-child) > ul.sub-menu {
  inset-inline-start: auto !important; left: auto !important; right: 0; }
.elementor-nav-menu--dropdown .elementor-nav-menu li.is-open > ul { display: block; }

/* gallery: e-gallery's layouts; columns, gap and tile shape come from the widget (style="" on the container) */
.elementor-gallery__container { --animation-duration: 350ms; --columns: var(--cols-d); }
@media (max-width: 1024px) { .elementor-gallery__container { --columns: var(--cols-t); } }
@media (max-width: 767px) { .elementor-gallery__container { --columns: var(--cols-m); } }
.e-gallery-grid .e-gallery-image { position: relative; overflow: hidden; }
.e-gallery-image > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* masonry: site.js puts each photo under the shortest column, as e-gallery did */
.e-gallery-masonry { position: relative; display: block; height: auto; margin: 0; }
.e-gallery-masonry .e-gallery-item { position: absolute; top: 0; left: 0; }
.e-gallery-masonry .e-gallery-image { position: relative; overflow: hidden; }

/* carousels (Swiper): slide widths and movement are set by site.js */
.swiper-wrapper.is-moving { transition: transform var(--speed, 500ms) ease; }
.elementor-slides .swiper-slide.is-active .swiper-slide-contents { animation: zoomIn 1.25s both; }
.swiper-pagination-bullet { cursor: pointer; border: 0; padding: 0; }

/* lightbox (Elementor's, for the gallery photos) */
.om-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, .8); display: none;
  align-items: center; justify-content: center; flex-direction: column; color: #fff; font-family: Roboto, sans-serif; }
.om-lightbox.is-open { display: flex; }
.om-lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.om-lightbox img { max-width: 90vw; max-height: 80vh; width: auto; height: auto; object-fit: contain; }
@media (max-width: 767px) { .om-lightbox img { max-width: 100vw; } }
/* the title sits at the bottom of the screen, as in Elementor's lightbox */
.om-lightbox figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 16px; font-size: 16px;
  font-weight: 700; text-align: center; color: #fff; font-style: normal; }
.om-lightbox button { position: absolute; background: none; border: 0; color: rgba(238, 238, 238, .9); cursor: pointer;
  padding: 16px; line-height: 0; }
.om-lightbox button:hover { color: #fff; }
.om-lightbox svg { width: 25px; height: 25px; fill: currentColor; }
.om-lightbox .lb-close { top: 4px; right: 4px; }
.om-lightbox .lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.om-lightbox .lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.om-lightbox .lb-count { position: absolute; top: 20px; left: 20px; font-size: 14px; opacity: .8; }
.e-gallery-item { cursor: pointer; }

/* portfolio cards (homepage and /oraldiseases/): the title sits at the bottom of the photo on a dark gradient,
   as on maxillofacial.gr /patient_information/ - shown on hover with a mouse, always on touch screens */
.elementor-element-5869408 .elementor-portfolio-item a .elementor-portfolio-item__overlay,
.elementor-element-4c9fbb7 .elementor-portfolio-item a .elementor-portfolio-item__overlay {
  inset: auto 0 0 0; justify-content: flex-end; padding: 32px 12px 12px; opacity: 1;
  background: linear-gradient(to top, rgba(10, 20, 40, .75), rgba(10, 20, 40, 0)); background-color: transparent !important; pointer-events: none; }
.elementor-element-5869408 .elementor-portfolio-item__title,
.elementor-element-4c9fbb7 .elementor-portfolio-item__title { color: #fff; font-size: 18px; font-weight: 600;
  line-height: 1.3; letter-spacing: .02em; }
@media (hover: hover) and (pointer: fine) {
  .elementor-element-5869408 .elementor-portfolio-item a .elementor-portfolio-item__overlay,
  .elementor-element-4c9fbb7 .elementor-portfolio-item a .elementor-portfolio-item__overlay { opacity: 0; transition: opacity .2s; }
  .elementor-element-5869408 .elementor-portfolio-item:hover a .elementor-portfolio-item__overlay,
  .elementor-element-4c9fbb7 .elementor-portfolio-item:hover a .elementor-portfolio-item__overlay,
  .elementor-element-5869408 .elementor-portfolio-item:focus-within a .elementor-portfolio-item__overlay,
  .elementor-element-4c9fbb7 .elementor-portfolio-item:focus-within a .elementor-portfolio-item__overlay { opacity: 1; }
}

/* photo galleries of the disease pages: the title at the bottom of the photo on a dark gradient (as on maxillofacial.gr),
   shown on hover with a mouse; on touch screens always shown, small and discreet */
.elementor-widget-gallery .elementor-gallery-item__overlay { background-color: transparent !important; }
.elementor-widget-gallery .elementor-gallery-item__content { top: auto; bottom: 0; height: auto;
  justify-content: flex-end; padding: 18px 8px 6px; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 20, 40, .6), rgba(10, 20, 40, 0)); }
.elementor-widget-gallery .elementor-gallery-item__title { font-size: 13px; font-weight: 600;
  line-height: 1.3; letter-spacing: .02em; opacity: .9; }
@media (hover: hover) and (pointer: fine) {
  .elementor-widget-gallery .elementor-gallery-item__content { padding: 32px 12px 12px; opacity: 0;
    transition: opacity .2s; background: linear-gradient(to top, rgba(10, 20, 40, .75), rgba(10, 20, 40, 0)); }
  .elementor-widget-gallery .elementor-gallery-item__title { font-size: 18px; opacity: 1; }
  .elementor-widget-gallery .e-gallery-item:hover .elementor-gallery-item__content,
  .elementor-widget-gallery .e-gallery-item:focus-visible .elementor-gallery-item__content { opacity: 1; }
}
/* the single captioned photo of /ιογενείς-λοιμώξεις/: same caption style as the galleries */
.elementor-335 .elementor-widget-image figure.wp-caption { position: relative; display: inline-block; margin: 0; line-height: 0; }
.elementor-335 .elementor-widget-image .widget-image-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 18px 8px 6px; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; letter-spacing: .02em;
  font-style: normal; text-align: center; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 20, 40, .6), rgba(10, 20, 40, 0)); }
@media (hover: hover) and (pointer: fine) {
  .elementor-335 .elementor-widget-image .widget-image-caption { padding: 32px 12px 12px; font-size: 18px; opacity: 0;
    transition: opacity .2s; background: linear-gradient(to top, rgba(10, 20, 40, .75), rgba(10, 20, 40, 0)); }
  .elementor-335 .elementor-widget-image figure.wp-caption:hover .widget-image-caption { opacity: 1; }
}
