/*
Theme Name: Anthemus LawGreece Child
Theme URI: https://anthemus.gr/
Description: Child theme for LawGreece.com, based on Hello Elementor.
Author: Anthemus IT Solutions
Author URI: https://anthemus.gr/
Template: hello-elementor
Version: 1.93.0
Text Domain: anthemus-lawgreece
*/

:root {
  --lg-deep-teal: #073B3D;
  --lg-warm-ivory: #F7F4EC;
  --lg-charcoal: #20252B;
  --lg-mint: #7ED3D1;
  --lg-dark-mint: #2A9D9F;
  --lg-muted-gold: #A88445;
  --lg-soft-mint: #DDEDEC;
  --lg-muted-text: #666B6B;
  --lg-white: #FFFFFF;
}

.story-single {
  background: var(--lg-warm-ivory);
  color: var(--lg-charcoal);
}

.story-single__wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 72px;
}

.story-single__article {
  width: min(820px, 100%);
  margin: 0 auto;
}

.story-single__back,
.story-single__eyebrow,
.story-single__meta,
.story-single__nav,
.story-single__caption {
  font-family: Roboto, Arial, sans-serif !important;
}

.story-single__back {
  display: inline-block;
  margin: 0 0 24px;
  color: var(--lg-dark-mint);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.story-single__back:hover { color: var(--lg-muted-gold); }

.story-single__eyebrow {
  margin: 0 0 12px;
  color: var(--lg-muted-gold);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.story-single__title {
  margin: 0;
  color: var(--lg-charcoal);
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(42px, 5vw, 58px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

.story-single__rule {
  width: 76px;
  height: 1px;
  margin: 22px 0 18px;
  background: var(--lg-muted-gold);
}

.story-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 30px;
  color: var(--lg-muted-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .6px;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   Story Featured Image
   JS classifies the REAL browser dimensions after image load.
   Wide landscape: natural full width.
   Portrait / square: 16:9 contain + blurred background on desktop.
   Low-res landscape: framed so it is not enlarged excessively.
   --------------------------------------------------------- */

.story-single__featured {
  margin: 0 0 38px;
}

.story-single__featured img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  cursor: zoom-in;
}

.story-single__featured.is-framed {
  --story-media-bg: none;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--lg-deep-teal);
}

.story-single__featured.is-framed::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -32px;
  background-image: var(--story-media-bg);
  background-position: center;
  background-size: cover;
  filter: blur(25px) saturate(.82) brightness(.72);
  transform: scale(1.1);
}

.story-single__featured.is-framed::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(7, 59, 61, .14);
}

.story-single__featured.is-framed img {
  position: relative;
  z-index: 1;
  width: auto !important;
  height: auto !important;
  max-width: calc(100% - 28px) !important;
  max-height: calc(100% - 28px) !important;
  object-fit: contain !important;
  box-shadow: 0 5px 20px rgba(0,0,0,.16);
}

.story-single__caption,
.story-single__content figcaption,
.story-single__content .wp-element-caption {
  margin-top: 8px !important;
  color: var(--lg-muted-text) !important;
  font-family: Roboto, Arial, sans-serif !important;
  font-size: 12px !important;
  font-style: italic;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

/* Gutenberg typography normalization */
.story-single__content,
.story-single__content p,
.story-single__content li,
.story-single__content .wp-block-paragraph,
.story-single__content .wp-block-list,
.story-single__content .wp-block-list-item,
.story-single__content pre,
.story-single__content code,
.story-single__content .wp-block-preformatted,
.story-single__content .wp-block-code {
  color: var(--lg-charcoal) !important;
  font-family: Roboto, Arial, sans-serif !important;
  font-size: 18px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.72 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  text-transform: none !important;
}

.story-single__content pre,
.story-single__content code,
.story-single__content .wp-block-preformatted,
.story-single__content .wp-block-code {
  white-space: pre-wrap !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.story-single__content p { margin: 0 0 1.25em; }

.story-single__content h1,
.story-single__content h2,
.story-single__content h3,
.story-single__content h4,
.story-single__content h5,
.story-single__content h6,
.story-single__content .wp-block-heading {
  color: var(--lg-charcoal) !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-style: normal !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  text-transform: none !important;
}

.story-single__content h2,
.story-single__content h2.wp-block-heading {
  margin: 1.7em 0 .55em !important;
  font-size: 34px !important;
  line-height: 1.15 !important;
}

.story-single__content h3,
.story-single__content h3.wp-block-heading {
  margin: 1.5em 0 .5em !important;
  font-size: 28px !important;
  line-height: 1.2 !important;
}

.story-single__content ul,
.story-single__content ol {
  margin: 0 0 1.4em 1.3em;
}

.story-single__content blockquote {
  margin: 2em 0;
  padding: 18px 22px;
  border-left: 2px solid var(--lg-muted-gold);
  background: var(--lg-soft-mint);
  color: var(--lg-charcoal);
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
}

.story-single__content img {
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
}

.story-single__content .wp-block-image { margin: 34px 0; }

.story-single__content .wp-block-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 36px 0 !important;
}

.story-single__content .wp-block-gallery > figure.wp-block-image,
.story-single__content .wp-block-gallery > .wp-block-image {
  width: 100% !important;
  margin: 0 !important;
}

.story-single__content .wp-block-gallery img {
  display: block;
  width: 100% !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.story-single__footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid #D8D2C7;
}

.story-single__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.story-single__nav a {
  color: var(--lg-dark-mint);
  font-family: Roboto, Arial, sans-serif !important;
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}

.story-single__nav a:hover { color: var(--lg-muted-gold); }
.story-single__nav-next { text-align: right; }

/* ---------------------------------------------------------
   Stories / Basic Posts thumbnails
   JS finds each card from its "Read More" link.
   No Elementor Pro CSS field or manual class is required.
   --------------------------------------------------------- */

.ant-story-thumb-frame {
  --ant-thumb-bg: none;
  position: relative;
  isolation: isolate;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--lg-deep-teal);
}

.ant-story-thumb-frame::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -24px;
  background-image: var(--ant-thumb-bg);
  background-position: center;
  background-size: cover;
  filter: blur(20px) saturate(.82) brightness(.72);
  transform: scale(1.1);
  opacity: 0;
}

.ant-story-thumb-frame::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(7,59,61,.12);
  opacity: 0;
}

.ant-story-thumb-frame.is-contain::before,
.ant-story-thumb-frame.is-contain::after {
  opacity: 1;
}

.ant-story-thumb-frame img,
.ant-story-thumb-frame picture,
.ant-story-thumb-frame picture img {
  display: block !important;
  position: relative;
  z-index: 1;
}

.ant-story-thumb-frame img,
.ant-story-thumb-frame picture {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

.ant-story-thumb-frame picture img {
  width: 100% !important;
  height: 100% !important;
}

.ant-story-thumb-frame.is-cover img {
  object-fit: cover !important;
}

.ant-story-thumb-frame.is-contain img {
  object-fit: contain !important;
  padding: 8px;
}

/* Lightbox */
.ant-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 59, 61, .94);
  overscroll-behavior: contain;
}

.ant-lightbox.is-open { display: flex; }

.ant-lightbox__figure {
  margin: 0;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  text-align: center;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.ant-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.ant-lightbox__caption {
  margin-top: 10px;
  color: var(--lg-warm-ivory);
  font-family: Roboto, Arial, sans-serif !important;
  font-size: 13px;
}

.ant-lightbox__close,
.ant-lightbox__prev,
.ant-lightbox__next {
  position: absolute;
  border: 0;
  background: transparent;
  color: var(--lg-warm-ivory);
  cursor: pointer;
  font: 400 34px/1 Arial, sans-serif;
}

.ant-lightbox__close { top: 18px; right: 22px; }

.ant-lightbox__prev,
.ant-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  padding: 18px;
}

.ant-lightbox__prev { left: 12px; }
.ant-lightbox__next { right: 12px; }

.ant-lightbox__close:hover,
.ant-lightbox__prev:hover,
.ant-lightbox__next:hover { color: var(--lg-mint); }

body.ant-lightbox-open { overflow: hidden; }

@media (max-width: 1024px) {
  .story-single__wrap {
    width: min(100% - 40px, 920px);
    padding-top: 48px;
  }
}

@media (max-width: 767px) {
  .story-single__wrap {
    width: calc(100% - 32px);
    padding: 34px 0 46px;
  }

  .story-single__back { margin-bottom: 18px; }

  .story-single__title {
    font-size: 36px;
    line-height: 1.04;
  }

  .story-single__meta { margin-bottom: 22px; }
  .story-single__featured { margin-bottom: 28px; }

  /* Portrait/square phone photos are shown naturally on mobile. */
  .story-single__featured.is-framed.is-portraitish {
    display: block;
    aspect-ratio: auto;
    overflow: visible;
    background: transparent;
  }

  .story-single__featured.is-framed.is-portraitish::before,
  .story-single__featured.is-framed.is-portraitish::after {
    display: none;
  }

  .story-single__featured.is-framed.is-portraitish img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    box-shadow: none;
    object-fit: contain !important;
  }

  .story-single__content,
  .story-single__content p,
  .story-single__content li,
  .story-single__content .wp-block-paragraph,
  .story-single__content pre,
  .story-single__content code,
  .story-single__content .wp-block-preformatted,
  .story-single__content .wp-block-code {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }

  .story-single__content h2,
  .story-single__content h2.wp-block-heading {
    font-size: 30px !important;
    line-height: 1.15 !important;
  }

  .story-single__content h3,
  .story-single__content h3.wp-block-heading {
    font-size: 25px !important;
  }

  .story-single__content blockquote { font-size: 21px; }

  .story-single__content .wp-block-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .story-single__nav { grid-template-columns: 1fr; }
  .story-single__nav-next { text-align: left; }

  .ant-lightbox { padding: 14px; }

  .ant-lightbox__prev,
  .ant-lightbox__next {
    font-size: 28px;
    padding: 12px;
  }
}


/* ---------------------------------------------------------
   Editorial landing pagination (Stories / Invest in Greece)
   Basic Posts Free has no pagination UI, so the child theme
   supplies lightweight server-side paging + these controls.
   --------------------------------------------------------- */
.ant-editorial-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 46px 0 8px;
  grid-column: 1 / -1;
  font-family: Roboto, Arial, sans-serif;
}

.ant-editorial-pagination a,
.ant-editorial-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #D8D2C7;
  color: var(--lg-dark-mint);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.ant-editorial-pagination a:hover,
.ant-editorial-pagination a:focus-visible {
  border-color: var(--lg-dark-mint);
  color: var(--lg-deep-teal);
  outline: none;
}

.ant-editorial-pagination .is-current {
  border-color: var(--lg-deep-teal);
  background: var(--lg-deep-teal);
  color: var(--lg-warm-ivory);
}

.ant-editorial-pagination .is-ellipsis {
  min-width: auto;
  padding-inline: 4px;
  border-color: transparent;
  color: var(--lg-muted-text);
}

.ant-editorial-pagination .is-prev,
.ant-editorial-pagination .is-next {
  padding-inline: 14px;
}

@media (max-width: 767px) {
  .ant-editorial-pagination {
    gap: 6px;
    margin-top: 36px;
  }

  .ant-editorial-pagination a,
  .ant-editorial-pagination span {
    min-width: 36px;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 13px;
  }
}
