/*
 * Theme Name: My Timber 2.x Starter Theme
 * Description: Starter Theme to use with Timber
 * Author: Upstatement and YOU!
*/

.fluid-heading {
    /*
  font-size: clamp(2rem, 5.5vw, 4.4vw);
  */
  line-height: 1.1;
}

.nav-text-links {
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0rem;
    line-height: 1;
  
}

/* Target image inside charles-object container */
.charles-object figure img,
.charles-object img {
    object-fit: none !important;
}


/* More specific selector to override Tailwind */
.page-content .wp-block-media-text.charles-object .wp-block-media-text__media img,
.page-content .charles-object figure img,
.page-content .charles-object img {
    object-fit: none !important;
}

/* Target subsequent paragraphs in media text blocks */
.page-content .wp-block-media-text .wp-block-media-text__content p + p {
    margin-top: 1rem !important;
}

/* More specific targeting for charles-object blocks */
.page-content .wp-block-media-text.charles-object .wp-block-media-text__content p + p {
    margin-top: 1rem !important;
}

.address-link {
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0rem;
    line-height: 1;
    font-size: 14.4px;
}

.swiper {
  width: 600px;
  height: 300px;
}

.swiper-button-next,
.swiper-button-prev {
  color: #312e81; /* indigo-900 */
  background: rgba(255,255,255,0.8);
  border-radius: 9999px;
  width: 2.5rem;
  height: 2.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.fluid-heading2 {
  font-size: clamp(2rem, 6vw, 4.75rem);
  line-height: 1;
}

.fluid-heading3 {
  font-size: clamp(2rem, 6vw, 3.75rem);
  line-height: 1;
}

.fluid-heading4 {
  font-size: clamp(2.25rem, 5vw, 3.45rem);
  line-height: 1;
}

.fluid-video {
  height: clamp(160px, 30vw, 600px);
}

.fluid-max-w {
  max-width: clamp(320px, 90vw, 1075px);
}

.article-h1 {
    position: relative; /* Ensure the parent element is positioned */
}

.page-icon-after {
  position: relative;
  display: inline-block;
}

.arrow-after {
  position: relative;
  display: inline-block;
}

.page-icon-after::after {
    content: '';
    display: block;
    width: 19vw;
    height: 19vw;
    max-width: 228px;
    max-height: 244px;
    background: var(--page-icon-url) no-repeat center / contain;
    position: absolute;
    top: 31%;
    right: -212px;
    transform: translateY(-50%);
    pointer-events: none;
    animation: tilt3d 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* 3D Tilt Animation for Page Icon */
@keyframes tilt3d {
    0%, 100% {
        transform: translateY(-50%) perspective(1000px) rotateY(0deg);
    }
    25% {
        transform: translateY(-50%) perspective(1000px) rotateY(-15deg) rotateX(5deg);
    }
    50% {
        transform: translateY(-50%) perspective(1000px) rotateY(0deg) rotateX(-3deg);
    }
    75% {
        transform: translateY(-50%) perspective(1000px) rotateY(15deg) rotateX(5deg);
    }
}

.title-icon-after::after {
    content: '';
    display: block;
    width: 320px;
    height: 308px;
    background: url(/wp-content/themes/timber-starter-theme/static/icons/home-lighting.svg) no-repeat center / contain;
    position: absolute;
    /* top: 74%; */
    right: -273px;
    top: -51px;
    /* transform: translateY(-50%); */
    pointer-events: none;
        
}

/* Theatre icon after element */
.title-icon-after {
  position: relative;
  overflow: visible;
  
  /* CSS Custom Properties (Variables) for dynamic icon control - no defaults set here */
  --icon-image: none;
  --icon-width: 0px;
  --icon-height: 0px;
  --icon-top: 0px;
  --icon-right: 0px;
  --icon-transform: rotate(0deg);
}

.title-icon-after::after {
  content: '';
  display: block;
  width: var(--icon-width);
  height: var(--icon-height);
  background: var(--icon-image) no-repeat center / contain;
  position: absolute;
  top: var(--icon-top);
  right: var(--icon-right);
  transform: var(--icon-transform);
  pointer-events: none;
  /* Removed transition to prevent morphing effect */
}

.theatre-icon-after {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: all 0.3s ease;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

/* Responsive adjustments for theatre icons */
@media (max-width: 768px) {
  .theatre-icon-after {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .theatre-icon-after {
    transform: scale(0.8) !important;
  }
}

.icon-arrow {
    width: 17px;
    height: 12px;
    margin-left: 8px;
}

.right {
    float: right;
}

.arrow-after, .arrow-after-video {
    position: relative;
}

.arrow-after::after, .arrow-after-video::after {
    content: '';
    display: none; /* Hidden by default on mobile */
}

@media (min-width: 768px) {
  .arrow-after::after {
    content: '';
    display: block;
    width: 8vw;
    height: 8vw;
    max-width: 90px;
    max-height: 90px;
    background: url(/wp-content/themes/timber-starter-theme/static/icons/newarrow2.svg) no-repeat center / contain;
    position: absolute;
    top: 50%;
    right: -10vw;
    transform: translateY(-50%);
    pointer-events: none;
  }
}

@media (min-width: 768px) {
  .arrow-after-video::after {
    content: '';
    display: block;
    width: 8vw;
    height: 8vw;
    max-width: 90px;
    max-height: 90px;
    background: url(/wp-content/themes/timber-starter-theme/static/icons/newarrow2.svg) no-repeat center / contain;
    position: absolute;
    top: 50%;
    right: -10vw;
    transform: translateY(-50%);
    pointer-events: none;

width: 137px;
        height: 192px;
        max-width: 137px;
        max-height: 211px;
        right: -98px;
        top: -15%;
        transform: rotate(-9deg);
  }
}

@media (min-width: 1450px) {
  .arrow-after-video::after {
    display: none;
  }
}

.arrow-mobile {
  background-image: url('/wp-content/themes/timber-starter-theme/static/icons/arrow1.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 2.5em;   /* Adjust size as needed */
  height: 2.5em;
  flex-shrink: 0;
}

@media (min-width: 876px) {
  .arrow-after::after {
    display: none;
  }
}



@media (min-width: 1450px) {
  .arrow-after::after {
    width: 137px;
    height: 239px;
    max-width: 177px;
    max-height: 205px;
    right: -145px;
    top: 49%;
    transform: rotate(-4deg);
    display: inline;
  }
}


@media (min-width: 1580px) {
  .arrow-after::after {
    width: 137px;
    height: 211px;
    max-width: 137px;
    max-height: 211px;
    right: -132px;
    top: 91%;
    transform: translateY(-50%);
  }
}




.half-background {
    background: linear-gradient(
        to top,
        white 0%,
        white 15%,
        #FBD04D 15%,
        #FBD04D 100%
        );
}

.split-bg {
    position: relative;
    z-index: 1;
}


.split-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px; /* default for mobile */
    background: #FBD04D;
    z-index: -1;
    pointer-events: none;
}

/* Tablet */
@media (min-width: 640px) {
    .split-bg::before {
        height: 400px;
    }
}

/* Medium screens */
@media (min-width: 768px) {
    .split-bg::before {
        height: 500px;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .split-bg::before {
        height: 600px;
    }
}

/* Extra large screens */
@media (min-width: 1280px) {
    .split-bg::before {
        height: 650px;
    }
}


.hero-section {
  position: relative;
  z-index: 1;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 73%; /* Covers 73% of the hero-section's height */
  background: #FBD04D;
  z-index: -1;
  pointer-events: none;
  border-radius: 0;
}

.hero-section-blog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 70%; /* Covers 70% of the hero-section's height */
  background: #FBD04D;
  z-index: -1;
  pointer-events: none;
  border-radius: 0;
}

/* Mobile adjustments for hero-section-blog */
@media (max-width: 767px) {
  .hero-section-blog::before {
    height: 87%; /* Adjust height for mobile */
  }
}

.hero-section2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 650px; /* Mobile height */
  background: #FBD04D;
  z-index: -1;
  pointer-events: none;
  border-radius: 0;
}

/* Tablet */
@media (min-width: 640px) {
  .hero-section2::before {
    height: 650px;
  }
}

/* Medium screens */
@media (min-width: 768px) {
  .hero-section2::before {
    height: 770px;
  }
}

/* Large screens and beyond - original 561px height */
@media (min-width: 1024px) {
  .hero-section2::before {
    height: 580px;
  }
}


.news_details {
    font-family: Maria, sans-serif;
    font-size: 12px;
    line-height: 1.16667;
    color: inherit;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.hamburger-div {
    position: relative;
    top: 4px;
}

.news_post {
    margin: 10px 10px 30px;
    display: block;
    margin-bottom: 40px;
}

a.news_post:hover .news_content .news_title {
    color: red;
}

.news_tag {
    text-transform: uppercase;
    margin-right: .3em;
}

.news_description {
    font-family: Maria, sans-serif;
    font-size: 14px;
    color: inherit;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;

    line-height: 1.28571;
    color: #666;
    margin-top: 14px;
    padding-right: 65px;
    min-height: 2.57143em;
    padding-right: 95px;
}

.faq-content {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    line-height: 1.125;
}

.faq-content p:not(:first-child):not(:last-child) {
margin-top: 1.25rem;
margin-bottom: 1.25rem;
}

.faq-content b,
.faq-content strong {
    font-weight: 500;
    background-color: #fffc40 !important;
}

.hdr-logo {
width: 90px;
height: auto;
position: relative;
}

.news_date {
    color: #ff294c;
}

.lower_bar {
    background-size: auto 3px;
    background-repeat: repeat-x;
    background-position: 100% 100%;
    position: relative;
    height: 15px;
    min-height: 15px;
    background-image: url('/wp-content/themes/timber-starter-theme/static/icons/lowerbar.svg');
}

.lower_bar img {
    position: absolute;
    right: 0;
    bottom: -10px;
    max-width: 80px;
        max-height: 80px;
}
/*
.article-h1::before {
    content: '';
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url('/wp-content/themes/timber-starter-theme/static/images/coolshape.svg');
    position: absolute; 
    top: 40%;
    left: -31px; 
    transform: translateY(-50%); 
    width: 1.8em; 
    height: 1.8em; 
}
    */
/*
    .article-h1 {
        position: relative;
        display: inline-block; 
    }
        */
    

@media (min-width: 1024px) {
    .article-h1::before {
        left: -40px;
        width: 1.3em; /* Relative to the font size of the parent */
    height: 1.3em; /* Relative to the font size of the parent */
    }
}


@media (min-width: 1280px) {
    .article-h1::before {
        left: -26px;
        width: 1.5em; /* Relative to the font size of the parent */
    height: 1.5em; /* Relative to the font size of the parent */
    }
}

@media (min-width: 1536px) {
    .article-h1::before {
        left: -31px;
        width: 1.8em; /* Relative to the font size of the parent */
        height: 1.8em; /* Relative to the font size of the parent */
    }
}






@media (min-width: 1280px) {
    #frontpage-news-card {
        margin-left: 14px;
    }
}

@media (min-width: 1300px) {
    #frontpage-news-card {
        margin-left: 0px;
    }
}

@media (min-width: 768px) {
    body {
        zoom: 90%
    }
}

@media (min-width: 1024px) {
    body {
        zoom: 87%
    }
}

@media (min-width: 1450px) {
    body {
        zoom: 93%
    }
}

@media (min-width: 1580px) {
    body {
        zoom: 91%
    }
}

@media (min-width: 2000px) {
    body {
        zoom: 100%
    }
}


/* Arrow bounce animation - isolated keyframes */
@keyframes arrow-bounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(4px);
    }
}

.arrow-bounce-hover:hover .arrow-animated {
    animation: arrow-bounce 0.6s ease-in-out;
}

/* FAQ Thumbnail Styling */
.faq-thumbnail-container {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.faq-thumbnail-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Force smaller image rendering for performance */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Reduce quality for faster loading */
    filter: contrast(1.1) brightness(1.02);
}

.faq-thumbnail-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}




/* styling for new block based page content */


.newpage-blockbased-styling {
  padding-bottom: 3.5rem;
}

.newpage-blockbased-styling figure.wp-block-gallery.has-nested-images {
  max-width: 61rem;
  margin-bottom: 4.5rem;
}


.newpage-blockbased-styling figure.wp-block-gallery.has-nested-images .wp-block-image img {
  border-radius: 0px;
  padding-right: 0.25rem;
} 

@media (max-width: 768px) {
    .newpage-blockbased-styling figure.wp-block-gallery.has-nested-images .wp-block-image {
height: 300px!important;
    }
  }

  @media (max-width: 410px) {
    .newpage-blockbased-styling figure.wp-block-gallery.has-nested-images .wp-block-image {
height: 260px!important;
    }
  }

    .newpage-blockbased-styling .wp-block-video {
    margin-top: 4rem;
    margin-bottom: 3rem;
  }

@media (min-width: 900px) {
  .newpage-blockbased-styling .wp-block-video {
    margin-top: 4rem;
    width: 59rem;
    margin-bottom: 3rem;
  }
}

.newpage-blockbased-styling .wp-block-video video {
border-radius: 7px;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.newpage-blockbased-styling .wp-block-image {
  /*
  margin-top: 3.15rem;
  */
  margin-bottom: 2.5rem;
  
}



@media (max-width: 768px) {
    .newpage-blockbased-styling .wp-block-image {

margin-bottom: 2rem;
    }
  }

  @media (max-width: 410px) {
    .newpage-blockbased-styling .wp-block-image {

    }
  }

@media (min-width: 575px) {
    .newpage-blockbased-styling .wp-block-image {
margin-bottom: 3rem;
    }
  }


.newpage-blockbased-styling .wp-block-image img {
border-radius: 7px;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.newpage-blockbased-styling strong {
  font-weight: 600!important;
}




/* Mobile (0-767px) */
@media (max-width: 767px) {
    .newpage-blockbased-styling .wp-block-image img {
        width: 100%;
        height: 24rem;
        border-radius: 0px;
    }
    
    .newpage-blockbased-styling .wp-block-video video {
        width: 100%;
        height: 22rem;
        border-radius: 0px;
    }
}

@media (max-width: 575px) {
    .newpage-blockbased-styling .wp-block-image img {
        width: 100%;
        height: 21rem;
        border-radius: 0px;
    }
  }

/* Small Tablet (768px-899px) - Height only */
@media (min-width: 768px) and (max-width: 899px) {
    .newpage-blockbased-styling .wp-block-image img {
        height: 34rem;
    }
    
    .newpage-blockbased-styling .wp-block-video video {
        height: 34rem;
    }
}

/* Tablet (900px-1023px) - Width and height */
@media (min-width: 900px) and (max-width: 1023px) {
    .newpage-blockbased-styling .wp-block-image img {
        width: 51rem;
        height: 34rem;
    }
    
    .newpage-blockbased-styling .wp-block-video video {
        width: 51rem;
        height: 34rem;
    }
}

/* Desktop (1024px+) - Original styling */
@media (min-width: 1024px) {
    .newpage-blockbased-styling .wp-block-image img {
        width: 61rem;
        height: 36rem;
    }
    
    .newpage-blockbased-styling .wp-block-video video {
        width: 61rem;
        height: 36rem;
    }
}

.newpage-blockbased-styling .wp-block-separator {
    margin-bottom: 3.4rem;
    width: 100%;
}

/* Mobile (0-767px) */
@media (max-width: 767px) {
    .newpage-blockbased-styling .wp-block-separator {
         margin-bottom: 2.5rem;
    }
}

/* Mobile (0-767px) */
@media (max-width: 767px) {
    .newpage-blockbased-styling .wp-block-separator {
        width: 100%;
    }
}

/* Small Tablet (768px-1023px) */
@media (min-width: 900px) and (max-width: 1023px) {
    .newpage-blockbased-styling .wp-block-separator {
        max-width: initial;
        width: 100%;
    }
}

/* Desktop (1024px+) - Original styling */
@media (min-width: 1024px) {
    .newpage-blockbased-styling .wp-block-separator {
        max-width: 1255px;
        width: 96%;
    }
}

.newpage-blockbased-styling .wp-block-image :where(figcaption) {
    font-size: 18px;
    font-style: italic;
    font-weight: 500;
}

/* Remove bottom margin from object-fit-contain images when they have captions */
/* Target the figure element that contains both img and figcaption */
.newpage-blockbased-styling figure.wp-block-image.has-object-fit-contain:has(figcaption) {
}

.newpage-blockbased-styling figure.wp-block-image.has-object-fit-contain:has(figcaption) img {
    padding-bottom: 0.25rem!important;
}

/* Alternative approach using sibling selector if :has() doesn't work */
.newpage-blockbased-styling .wp-block-image.has-object-fit-contain img:has(+ figcaption) {
    padding-bottom: 0.25rem!important;
}

.newpage-blockbased-styling > h1 {
  margin-bottom: 1rem; /* mb-4 */
  margin-top: 2rem; /* mt-8 */
  max-width: 50rem; /* max-w-4xl */
  font-family: "Rethink Sans", sans-serif; /* font-rethink */
  font-size: 2.5rem; /* Base size */
  font-weight: 700;
  line-height: 1; /* Default mobile line-height */
  color: #000000; /* text-black */
  scroll-margin-top: 2rem; /* scroll-mt-8 */
  margin: 0 0 1.75rem 0; /* Mobile margin */
}

/* Responsive sizing and margin for h1 */
@media (min-width: 768px) {
  .newpage-blockbased-styling > h1 {
    font-size: 3.45rem;
    line-height: 59px; /* Apply fixed line-height above mobile */
    margin-bottom: 3.3rem; /* Desktop margin */
    margin-top: -9px;
  }
}

@media (max-width: 767px) {
  .newpage-blockbased-styling > h1 {
    font-size: 2.25rem;
    /* Keeps line-height: 1 and 1.75rem margin from default */
  }
}

.newpage-blockbased-styling > h4, .newpage-blockbased-styling > h3 {
  margin-bottom: 1rem; /* mb-4 */
  margin-top: 2rem; /* mt-8 */
  max-width: 56rem; /* max-w-4xl */
  font-family: "Rethink Sans", sans-serif; /* font-rethink */
  font-size: 1.5rem; /* text-2xl */
  font-weight: 600; /* font-semibold */
  line-height: 1.25; /* leading-tight */
  color: #000000; /* text-black */
  scroll-margin-top: 2rem; /* scroll-mt-8 */
}

/* Responsive text size for xs breakpoint */
@media (min-width: 475px) {
  .newpage-blockbased-styling > h4, .newpage-blockbased-styling > h3 {
    font-size: 1.875rem; /* xs:text-3xl */
  }
}

/* Spacer block margin management */
.newpage-blockbased-styling .wp-block-spacer {
  margin: 0; /* Remove default margins from spacer itself */
}

/* Custom mobile-reduced spacer classes */
/* Usage: Add "mobile-reduced" to Additional CSS Classes in spacer block settings */
.newpage-blockbased-styling .wp-block-spacer.mobile-reduced {
  @media (max-width: 767px) {
    /* Reduce height by 10px on mobile, minimum 10px */
    height: max(calc(var(--spacer-height, 50px) - 10px), 10px) !important;
  }
}

/* Alternative: larger reduction of 20px */
.newpage-blockbased-styling .wp-block-spacer.mobile-reduced-large {
  @media (max-width: 767px) {
    /* Reduce height by 20px on mobile, minimum 10px */
    height: max(calc(var(--spacer-height, 50px) - 20px), 10px) !important;
  }
}

/* Alternative: increase spacing on mobile by 1px */
.newpage-blockbased-styling .wp-block-spacer.mobile-increased-large {
  @media (max-width: 767px) {
    /* Increase height by 1px on mobile */
    height: calc(var(--spacer-height, 50px) + 1px) !important;
  }
}

/* JavaScript will set CSS custom property from inline style */

/* Remove bottom margin from elements that come before a spacer */
.newpage-blockbased-styling *:has(+ .wp-block-spacer) {
  margin-bottom: 0 !important;
}

/* Remove top margin from elements that come after a spacer */
.newpage-blockbased-styling .wp-block-spacer + * {
  margin-top: 0 !important;
}

/* Fallback for browsers that don't support :has() */
.newpage-blockbased-styling h1 + .wp-block-spacer,
.newpage-blockbased-styling h2 + .wp-block-spacer,
.newpage-blockbased-styling h3 + .wp-block-spacer,
.newpage-blockbased-styling h4 + .wp-block-spacer,
.newpage-blockbased-styling p + .wp-block-spacer,
.newpage-blockbased-styling .wp-block-image + .wp-block-spacer,
.newpage-blockbased-styling .wp-block-video + .wp-block-spacer {
  margin-top: 0;
}

/* Emoji mobile layout fixes - Hide on mobile */
@media (max-width: 1024px) {
  /* Hide all emoji images on mobile to prevent line breaking */
  .content-block-left-1image__title img.emoji,
  .newpage-blockbased-styling h1 img.emoji,
  .newpage-blockbased-styling h2 img.emoji,
  .newpage-blockbased-styling h3 img.emoji,
  .newpage-blockbased-styling h4 img.emoji,
  img.emoji {
    display: none !important;
  }
}

.newpage-blockbased-styling h1:has(+ .wp-block-spacer),
.newpage-blockbased-styling h2:has(+ .wp-block-spacer),
.newpage-blockbased-styling h3:has(+ .wp-block-spacer),
.newpage-blockbased-styling h4:has(+ .wp-block-spacer),
.newpage-blockbased-styling p:has(+ .wp-block-spacer),
.newpage-blockbased-styling .wp-block-image:has(+ .wp-block-spacer),
.newpage-blockbased-styling .wp-block-video:has(+ .wp-block-spacer) {
  margin-bottom: 0;
}


@media (max-width: 768px) {
.footer-link:not(:last-child)::after {
  content: ""!important;
    margin-left: 1rem!important;
    transform: scale(0.4);
}
}