/*
Theme Name: Hestia Pro Child
Theme URI: https://www.themeisle.com/
Description: This is a custom child theme I have created.
Author: ThemeIsle
URI: https://www.themeisle.com/
Template: hestia-pro
Version: 0.1
*/

/* MLR archive layout tuning (desktop/mobile parity) */
@media (min-width: 992px) {
  /* Archive-friendly desktop width: slightly narrower than default full-width look */
  .container {
    max-width: 1120px;
  }

  /* Keep middle icon column narrower in love-story */
  #love-story .hestia-features-content > .row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: nowrap;
    text-align: center;
  }

  #love-story .feature-box:nth-child(2) {
    flex: 0 0 10%;
    width: 10%;
    max-width: 10%;
    margin-left: 0;
    margin-right: 0;
  }
  #love-story .feature-box:nth-child(1),
  #love-story .feature-box:nth-child(3) {
    flex: 0 0 45%;
    width: 45%;
    max-width: 45%;
    margin-left: 0;
    margin-right: 0;
  }

  #love-story .feature-box .hestia-info {
    text-align: center;
    max-width: none;
  }

  /* Wedding cards: slightly smaller image blocks on desktop */
  #wedding .card-testimonial .card-image {
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Life and updates cards: override Hestia's inline-block home layout */
  #life .hestia-blog-content .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    margin-left: -15px;
    margin-right: -15px;
    padding: 0;
    text-align: left;
  }
  #life .hestia-blog-item {
    width: 33.333333%;
    max-width: 33.333333%;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0 !important;
    float: none !important;
    display: flex;
    min-width: 0;
    vertical-align: top;
  }
  #life .hestia-blog-item .card-blog {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  #life .hestia-blog-item .card-image {
    height: auto;
    aspect-ratio: 3 / 2;
    margin-bottom: 24px;
  }
  #life .hestia-blog-item .card-image a {
    display: block;
    width: 100%;
    height: 100%;
  }
  #life .hestia-blog-item .card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  #life .hestia-blog-item .card-blog .content {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  #life .hestia-blog-item .card-description {
    flex: 1;
  }
}

/* Avoid empty visual row slots in life section */
#life .hestia-blog-content .row:empty {
  display: none;
}

/* Gallery section cards balanced across breakpoints */
#wedding .card-testimonial .card-image img {
  width: 100%;
  height: auto;
}

/* Keep feature icon proportionate */
#love-story .feature-box:nth-child(2) .icon {
  font-size: 56px;
}

/* Ensure all social/nav icons keep original tint and sizing behavior */
.navbar .fa-local-icon,
.hestia-nav .fa-local-icon,
.page-header .fa-local-icon {
  color: inherit;
}

#love-story .fa-local-icon.fa-3x,
#love-story .fa-local-icon.fa-4x,
#love-story .fa-local-icon.fa-5x {
  font-size: inherit;
}

/* Improve readability of the invitation copy by narrowing line length on desktop */
@media (min-width: 992px) {
  #invitation .hestia-about-content {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* Normalize icon size in "How did all of this begin?" cards */
#love-story .feature-box .hestia-info .icon > i {
  font-size: 56px !important;
  line-height: 1 !important;
}

/* Force equal icon sizing for all three love-story cards (FA4 + FA5 SVG/local) */
#love-story .feature-box .hestia-info .icon {
  font-size: 56px !important;
  line-height: 1 !important;
  min-height: 56px;
}

#love-story .feature-box .hestia-info .icon > i,
#love-story .feature-box .hestia-info .icon > svg,
#love-story .feature-box .hestia-info .icon .fa-local-icon {
  font-size: inherit !important;
  line-height: 1 !important;
  width: 1em !important;
  height: 1em !important;
  vertical-align: middle !important;
}

/* Keep Dashicons in navbar menus same shade as other menu icons */
.navbar .obfx-menu-icon.dashicons,
.navbar .navbar-nav > li > a .obfx-menu-icon.dashicons,
.navbar .navbar-nav > li .dropdown-menu a .obfx-menu-icon.dashicons {
  color: inherit !important;
  opacity: 1 !important;
}

/* Navbar dropdown consistency: align mixed FA + Dashicons and list rows uniformly (includes Lovers) */
.navbar .navbar-nav > li .dropdown-menu > li > a {
  display: flex !important;
  align-items: center;
}

.navbar .navbar-nav > li .dropdown-menu > li > a > .obfx-menu-icon,
.navbar .navbar-nav > li .dropdown-menu > li > a > i.obfx-menu-icon {
  width: 20px;
  min-width: 20px;
  margin-right: 12px !important;
  text-align: center;
  color: inherit !important;
  opacity: 1 !important;
  line-height: 1;
}

.navbar .navbar-nav > li .dropdown-menu > li > a > .obfx-menu-icon.dashicons {
  font-size: 14px !important;
  height: 14px;
}

/* Equal-height related post cards while keeping content top-aligned */
.section.related-posts > .container > .row > .col-md-12 > .row {
  display: flex;
  flex-wrap: wrap;
}

.section.related-posts > .container > .row > .col-md-12 > .row > [class*="col-"] {
  display: flex;
}

.section.related-posts .card.card-blog {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.section.related-posts .card.card-blog .card-image {
  height: auto;
}

.section.related-posts .card.card-blog .card-image img {
  height: auto;
}

.section.related-posts .card.card-blog .content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
}

/* MLR archive mobile navbar */
.mlr-mobile-nav {
  display: none !important;
}

@media (max-width: 768px) {
  :root {
    --mlr-mobile-nav-fg: #555;
    --mlr-mobile-nav-muted: #777;
    --mlr-mobile-nav-current: #f4b37a;
    --mlr-mobile-nav-guide: rgba(85, 85, 85, 0.16);
  }

  html,
  body {
    overflow-x: hidden;
  }

  body.mlr-mobile-nav-open {
    overflow: hidden !important;
  }

  body.mlr-mobile-nav-ready .header > .navbar,
  body.mlr-mobile-nav-ready .navbar.navbar-fixed-top,
  body.mlr-mobile-nav-ready .navbar.navbar-fixed-top.navbar-scroll-point {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    transform: none !important;
  }

  body.mlr-mobile-nav-ready .navbar > .container {
    display: block !important;
    padding: 6px 18px 6px 15px !important;
  }

  body.mlr-mobile-nav-ready .container .navbar-header {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 auto;
  }

  body.mlr-mobile-nav-ready .navbar .title-logo-wrapper {
    order: 0;
    flex: 0 1 auto;
    min-width: 0;
    margin-right: auto;
    display: flex;
    align-items: center;
  }

  body.mlr-mobile-nav-ready .navbar .navbar-header .navbar-brand {
    display: flex;
    align-items: center;
    padding: 0 !important;
    margin: 0;
    min-width: 0;
  }

  body.mlr-mobile-nav-ready .navbar .navbar-header .navbar-brand img {
    max-height: 38px;
    width: auto;
  }

  body.mlr-mobile-nav-ready .navbar .navbar-toggle-wrapper {
    order: 1;
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: 8px;
    padding-right: 0;
  }

  body.mlr-mobile-nav-ready .navbar .navbar-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px !important;
    margin: 0 !important;
  }

  body.mlr-mobile-nav-ready #main-navigation {
    display: none !important;
  }

  .mlr-mobile-nav {
    display: block !important;
    position: fixed;
    top: var(--mlr-mobile-nav-top, 64px);
    right: 0;
    left: 0;
    z-index: 1029;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, -10px, 0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .mlr-mobile-nav.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
  }

  .mlr-mobile-nav__panel {
    position: relative;
    max-height: calc(100dvh - var(--mlr-mobile-nav-top, 64px) - 12px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #fff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
    padding: 8px 0 env(safe-area-inset-bottom, 0);
  }

  .mlr-mobile-list,
  .mlr-mobile-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mlr-mobile-item {
    background: #fff;
    color: var(--mlr-mobile-nav-fg);
  }

  .mlr-mobile-row {
    display: flex;
    align-items: stretch;
    min-height: 56px;
  }

  .mlr-mobile-link {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    padding-left: calc(16px + (var(--mlr-depth, 0) * 16px));
    color: var(--mlr-mobile-nav-fg) !important;
    text-decoration: none;
  }

  .mlr-mobile-link:visited,
  .mlr-mobile-link:hover,
  .mlr-mobile-link:focus,
  .mlr-mobile-link:active {
    color: var(--mlr-mobile-nav-fg);
    text-decoration: none;
  }

  .mlr-mobile-link .caret-wrap {
    display: none !important;
  }

  .mlr-mobile-link > i:first-child:empty {
    display: none;
  }

  .mlr-mobile-link .obfx-menu-icon,
  .mlr-mobile-link .dashicons {
    flex: 0 0 auto;
    color: inherit !important;
  }

  .mlr-mobile-expander {
    flex: 0 0 auto;
    width: 40px;
    min-width: 40px;
    height: 56px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--mlr-mobile-nav-fg) !important;
    padding: 0 !important;
    margin: 0 14px 0 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
  }

  .mlr-mobile-expander:focus {
    outline: 2px solid rgba(244, 179, 122, 0.45);
    outline-offset: -2px;
  }

  .mlr-mobile-expander:hover,
  .mlr-mobile-expander:active,
  .mlr-mobile-expander:focus {
    background: transparent !important;
    color: var(--mlr-mobile-nav-fg) !important;
    box-shadow: none !important;
  }

  .mlr-mobile-expander .caret-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  .mlr-mobile-expander .caret {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border: 0;
    pointer-events: none;
  }

  .mlr-mobile-expander .caret svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.22s ease;
    pointer-events: none;
  }

  .mlr-mobile-item.is-open > .mlr-mobile-row .mlr-mobile-expander .caret svg {
    transform: rotate(180deg);
  }

  .mlr-mobile-group[hidden] {
    display: block !important;
  }

  .mlr-mobile-group {
    background: transparent;
    margin-left: 20px;
    border-left: 1px solid var(--mlr-mobile-nav-guide);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.32s ease, opacity 0.24s ease, transform 0.24s ease;
    will-change: max-height, opacity, transform;
  }

  .mlr-mobile-item.is-open > .mlr-mobile-group {
    opacity: 1;
    transform: translateY(0);
  }

  .mlr-mobile-sublist .mlr-mobile-item {
    background: transparent;
  }

  .mlr-mobile-sublist .mlr-mobile-link {
    padding-left: calc(18px + (var(--mlr-depth, 0) * 18px));
  }

  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-link,
  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-link:visited,
  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-link:hover,
  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-link:focus,
  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-link:active,
  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-link .obfx-menu-icon,
  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-link .dashicons,
  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-expander {
    color: var(--mlr-mobile-nav-current) !important;
  }

  .mlr-mobile-item.is-current > .mlr-mobile-row .mlr-mobile-link {
    font-weight: 500;
  }

  .mlr-mobile-item.is-current-ancestor > .mlr-mobile-row .mlr-mobile-link,
  .mlr-mobile-item.is-current-ancestor > .mlr-mobile-row .mlr-mobile-link:visited,
  .mlr-mobile-item.is-current-ancestor > .mlr-mobile-row .mlr-mobile-link:hover,
  .mlr-mobile-item.is-current-ancestor > .mlr-mobile-row .mlr-mobile-link:focus,
  .mlr-mobile-item.is-current-ancestor > .mlr-mobile-row .mlr-mobile-link:active {
    color: var(--mlr-mobile-nav-fg) !important;
    font-weight: 500;
  }

  .mlr-mobile-item.is-current-ancestor > .mlr-mobile-row .mlr-mobile-expander {
    color: var(--mlr-mobile-nav-fg) !important;
  }

  .mlr-mobile-divider {
    padding: 8px 16px;
  }

  .mlr-mobile-divider hr {
    margin: 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .mlr-mobile-description {
    display: block;
    margin-top: 4px;
    font-size: 1.2rem;
    line-height: 1.45;
    color: var(--mlr-mobile-nav-muted);
  }

  .section.related-posts > .container > .row > .col-md-12 > .row {
    display: block;
  }

  .section.related-posts > .container > .row > .col-md-12 > .row > [class*="col-"] {
    display: block;
    float: none;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
  }

  .section.related-posts > .container > .row > .col-md-12 > .row > [class*="col-"] + [class*="col-"] {
    padding-top: 18px;
  }

  .section.related-posts .card.card-blog {
    display: block;
    margin-bottom: 0;
  }
}

:root {
  --mlr-archive-widget-bg: rgba(250, 247, 242, 0.98);
  --mlr-archive-widget-border: rgba(85, 85, 85, 0.12);
  --mlr-archive-widget-fg: #555;
  --mlr-archive-widget-muted: #7a766f;
  --mlr-archive-widget-accent: #f4b37a;
  --mlr-archive-widget-shadow: 0 18px 40px rgba(46, 40, 31, 0.16);
}

.mlr-archive-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  width: 62px;
  height: 62px;
  pointer-events: none;
}

.mlr-archive-widget .hestia-scroll-to-top,
.mlr-archive-widget .hestia-scroll-to-top:hover,
.mlr-archive-widget .hestia-scroll-to-top:focus,
.mlr-archive-widget .hestia-scroll-to-top:active {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(85, 85, 85, 0.18);
  border-radius: 999px;
  background: rgba(85, 85, 85, 0.94);
  color: #faf7f2;
  box-shadow: 0 18px 36px rgba(46, 40, 31, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  transition: opacity 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
  pointer-events: none;
}

.mlr-archive-widget .hestia-scroll-to-top.hestia-fade,
.mlr-archive-widget.is-open .hestia-scroll-to-top {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mlr-archive-widget .hestia-scroll-to-top:hover,
.mlr-archive-widget .hestia-scroll-to-top:focus {
  color: #fff;
  box-shadow: 0 20px 40px rgba(46, 40, 31, 0.26);
}

.mlr-archive-widget .hestia-scroll-to-top:focus {
  outline: 2px solid rgba(244, 179, 122, 0.45);
  outline-offset: 3px;
}

.mlr-archive-widget__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mlr-archive-widget__toggle-icon svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: currentColor;
}

@media (min-width: 1180px) {
  .mlr-archive-widget {
    right: max(18px, calc((100vw - 1170px) / 2 + 18px));
  }
}

.mlr-archive-widget__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(322px, calc(100vw - 28px));
  padding: 20px 20px 18px;
  border: 1px solid var(--mlr-archive-widget-border);
  border-radius: 20px;
  background: var(--mlr-archive-widget-bg);
  box-shadow: var(--mlr-archive-widget-shadow);
  color: var(--mlr-archive-widget-fg);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.24s ease, transform 0.24s ease;
  pointer-events: none;
}

.mlr-archive-widget.is-open {
  pointer-events: auto;
}

.mlr-archive-widget.is-open .mlr-archive-widget__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mlr-archive-widget__body {
  margin: 0;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1.65;
  color: var(--mlr-archive-widget-fg);
}

.mlr-archive-widget__heart {
  display: inline-block;
  margin: 0 0.12em;
}

.mlr-archive-widget__link,
.mlr-archive-widget__link:visited {
  color: var(--mlr-archive-widget-accent);
  font-weight: 500;
  text-decoration: none;
}

.mlr-archive-widget__link:hover,
.mlr-archive-widget__link:focus {
  color: #efac71;
  text-decoration: underline;
}

.mlr-archive-widget__link:focus {
  outline: 2px solid rgba(244, 179, 122, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 767px) {
  .mlr-archive-widget {
    right: 14px;
    left: auto;
    bottom: 14px;
    width: 58px;
    height: 58px;
  }

  .mlr-archive-widget .hestia-scroll-to-top,
  .mlr-archive-widget .hestia-scroll-to-top:hover,
  .mlr-archive-widget .hestia-scroll-to-top:focus,
  .mlr-archive-widget .hestia-scroll-to-top:active {
    width: 58px;
    height: 58px;
    margin: 0;
  }

  .mlr-archive-widget__panel {
    width: min(284px, calc(100vw - 28px));
    right: 0;
    left: auto;
    bottom: 66px;
    padding: 18px 16px 14px;
  }

  .mlr-archive-widget__body {
    padding: 0;
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mlr-archive-widget .hestia-scroll-to-top,
  .mlr-archive-widget__panel {
    transition: none;
  }
}
