/*
Homepage layout overrides for Abletone
--------------------------------------
1. Services + Featured Content sections -> compact N-up carousels
2. Blog ("News") listing -> 2/3/4 column grid with a "... more" loader
3. Shared card styling so all three sections read as one system

Column counts come from Customizer > Theme Options > Homepage Layout.
Loaded after style.css, so it intentionally wins on shared selectors.
*/

/*--------------------------------------------------------------
1. Shared card treatment
--------------------------------------------------------------*/

.abletone-2up-carousel .hentry-inner,
.archive-post-wrap.blog-grid .hentry .hentry-inner {
  -webkit-border-radius: 10px;
  border-radius: 10px;
  overflow: hidden;
  -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  -webkit-transition: -webkit-transform 0.25s ease, -webkit-box-shadow 0.25s ease;
  transition: transform 0.25s ease, box-shadow 0.25s ease; }

.abletone-2up-carousel .hentry-inner:hover,
.archive-post-wrap.blog-grid .hentry .hentry-inner:hover {
  -webkit-transform: translateY(-4px);
  transform: translateY(-4px);
  -webkit-box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28); }

.abletone-2up-carousel .post-thumbnail img,
.abletone-2up-carousel .post-thumbnail-background,
.archive-post-wrap.blog-grid .post-thumbnail-background {
  -webkit-transition: -webkit-transform 0.4s ease;
  transition: transform 0.4s ease; }

.abletone-2up-carousel .hentry-inner:hover .post-thumbnail img,
.archive-post-wrap.blog-grid .hentry-inner:hover .post-thumbnail-background {
  -webkit-transform: scale(1.04);
  transform: scale(1.04); }

/*--------------------------------------------------------------
2. Section carousels (Services / Featured Content)
--------------------------------------------------------------*/

/* Owl hides .owl-carousel until it initialises - keep content visible
   when JS or Owl is unavailable. */
.no-js .abletone-2up-carousel,
.abletone-2up-carousel.no-carousel-fallback {
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 30px;
  gap: 30px; }

/* Tighter section chrome so the first two blocks take less vertical space. */
#service-section.section,
#featured-content-section.section {
  padding-top: 42px;
  padding-bottom: 42px; }

#service-section .section-heading-wrapper,
#featured-content-section .section-heading-wrapper {
  margin-bottom: 28px;
  padding-top: 0;
  padding-bottom: 0; }

#service-section .section-title,
#featured-content-section .section-title {
  margin-bottom: 0; }

/* Equal height slides. */
.abletone-2up-carousel .owl-stage {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: stretch;
  -ms-flex-align: stretch;
  align-items: stretch; }

.abletone-2up-carousel .owl-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto; }

.abletone-2up-carousel .owl-item > .hentry,
.abletone-2up-carousel > .hentry {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex; }

.abletone-2up-carousel .hentry-inner {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  width: 100%;
  height: 100%; }

.abletone-2up-carousel .entry-container {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: 24px 26px !important;
  width: 100% !important;
  float: none !important;
  margin: 0 !important; }

.abletone-2up-carousel .entry-title {
  font-size: 21px;
  font-size: 1.3125rem;
  line-height: 1.3;
  margin-bottom: 12px; }

/* 4-up cards are narrow - drop the type a step. */
.abletone-2up-carousel.columns-4 .entry-title {
  font-size: 18px;
  font-size: 1.125rem; }

.abletone-2up-carousel .entry-meta {
  margin-bottom: 8px; }

/* Keep the cards short - the full text lives on the single post. */
.abletone-2up-carousel .entry-summary p {
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden; }

.abletone-2up-carousel.columns-4 .entry-summary p {
  -webkit-line-clamp: 4; }

/* Uniform banner crop for BOTH sections so they read as one system. */
#featured-content-section .abletone-2up-carousel .post-thumbnail,
#service-section .abletone-2up-carousel .post-thumbnail {
  margin: 0;
  padding: 0;
  overflow: hidden;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto; }

#featured-content-section .abletone-2up-carousel .post-thumbnail img,
#service-section .abletone-2up-carousel .post-thumbnail img {
  display: block;
  width: 100%;
  max-width: none;
  height: 200px;
  margin: 0;
  -o-object-fit: cover;
  object-fit: cover;
  -webkit-border-radius: 0;
  border-radius: 0; }

.abletone-2up-carousel.columns-4 .post-thumbnail img {
  height: 170px; }

/* Carousel navigation. */
.abletone-2up-carousel .owl-nav {
  margin-top: 24px;
  text-align: center; }

.abletone-2up-carousel .owl-nav button.owl-prev,
.abletone-2up-carousel .owl-nav button.owl-next {
  position: relative;
  width: 42px;
  height: 42px;
  margin: 0 6px;
  border: 1px solid currentColor;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  background: transparent;
  opacity: 0.6;
  padding: 0; }

.abletone-2up-carousel .owl-nav button.owl-prev:hover,
.abletone-2up-carousel .owl-nav button.owl-next:hover,
.abletone-2up-carousel .owl-nav button.owl-prev:focus,
.abletone-2up-carousel .owl-nav button.owl-next:focus {
  opacity: 1;
  background: transparent; }

.abletone-2up-carousel .owl-nav button.owl-prev:before,
.abletone-2up-carousel .owl-nav button.owl-next:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor; }

.abletone-2up-carousel .owl-nav button.owl-prev:before {
  -webkit-transform: translate(-30%, -50%) rotate(-135deg);
  transform: translate(-30%, -50%) rotate(-135deg); }

.abletone-2up-carousel .owl-nav button.owl-next:before {
  -webkit-transform: translate(-70%, -50%) rotate(45deg);
  transform: translate(-70%, -50%) rotate(45deg); }

.abletone-2up-carousel .owl-dots {
  display: none !important; }

@media screen and (max-width: 767px) {
  #featured-content-section .abletone-2up-carousel .post-thumbnail img,
  #service-section .abletone-2up-carousel .post-thumbnail img {
    height: 180px; } }

/*--------------------------------------------------------------
3. Blog grid ("News") + "... more" loader
--------------------------------------------------------------*/

/* Mobile first: one column, stepping up with the viewport. */
.archive-post-wrap.blog-grid {
  display: -ms-grid;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 24px;
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%; }

.archive-post-wrap.blog-grid .hentry {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0; }

.archive-post-wrap.blog-grid .hentry .hentry-inner,
.archive-post-wrap.blog-grid .hentry .post-wrapper {
  max-width: none !important;
  width: 100% !important;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin: 0 !important; }

.archive-post-wrap.blog-grid .hentry .hentry-inner > div {
  width: 100% !important; }

/* Thumbnail becomes a fixed-ratio card image instead of a split panel. */
.archive-post-wrap.blog-grid .hentry .post-thumbnail-background {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 62% !important;
  margin: 0 !important;
  background-position: center center !important;
  background-size: cover !important;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto; }

.archive-post-wrap.blog-grid .hentry .post-thumbnail-background .cover-link {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block; }

.archive-post-wrap.blog-grid .hentry .entry-container,
.archive-post-wrap.blog-grid .hentry:nth-child(2n) .entry-container,
.archive-post-wrap.blog-grid .hentry .post-thumbnail-background + .entry-container {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
  padding: 22px 24px !important;
  -webkit-transform: none !important;
  transform: none !important;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto; }

.archive-post-wrap.blog-grid .hentry .entry-title {
  font-size: 19px;
  font-size: 1.1875rem;
  line-height: 1.35;
  margin-bottom: 10px; }

.archive-post-wrap.blog-grid.columns-4 .hentry .entry-title {
  font-size: 17px;
  font-size: 1.0625rem; }

.archive-post-wrap.blog-grid .hentry .entry-meta {
  font-size: 13px;
  font-size: 0.8125rem;
  margin-bottom: 8px; }

.archive-post-wrap.blog-grid .hentry .entry-summary p {
  font-size: 15px;
  font-size: 0.9375rem;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden; }

.archive-post-wrap.blog-grid .hentry .sticky-post {
  margin-bottom: 10px; }

/* Column steps. columns-2 stays at 2 all the way up. */
@media screen and (min-width: 568px) {
  .archive-post-wrap.blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 30px;
    gap: 30px;
    padding: 0 30px; } }

@media screen and (min-width: 901px) {
  .archive-post-wrap.blog-grid.columns-3,
  .archive-post-wrap.blog-grid.columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media screen and (min-width: 1201px) {
  .archive-post-wrap.blog-grid.columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* "... more" button */
.abletone-load-more {
  clear: both;
  text-align: center;
  padding: 42px 30px 0; }

.abletone-load-more-button .load-more-busy {
  display: none; }

.abletone-load-more-button.is-busy .load-more-text {
  display: none; }

.abletone-load-more-button.is-busy .load-more-busy {
  display: inline; }

.abletone-load-more-button[disabled] {
  cursor: progress;
  opacity: 0.7; }

.abletone-load-more-finished:empty {
  display: none; }

.abletone-load-more-finished {
  margin: 18px 0 0;
  font-size: 15px;
  font-size: 0.9375rem;
  opacity: 0.7; }

/*--------------------------------------------------------------
4. Reduced motion
--------------------------------------------------------------*/

@media (prefers-reduced-motion: reduce) {
  .abletone-2up-carousel .hentry-inner,
  .archive-post-wrap.blog-grid .hentry .hentry-inner,
  .abletone-2up-carousel .post-thumbnail img,
  .archive-post-wrap.blog-grid .post-thumbnail-background {
    -webkit-transition: none;
    transition: none; }

  .abletone-2up-carousel .hentry-inner:hover,
  .archive-post-wrap.blog-grid .hentry .hentry-inner:hover {
    -webkit-transform: none;
    transform: none; }

  .abletone-2up-carousel .hentry-inner:hover .post-thumbnail img,
  .archive-post-wrap.blog-grid .hentry-inner:hover .post-thumbnail-background {
    -webkit-transform: none;
    transform: none; } }
