/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat:wght@700&family=Roboto:wght@400;700&display=swap');

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* Retain Roboto for body text */
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif; /* Retain Montserrat for headings */
}

.wiggle {
    max-width: 50%;
}

.strip {
    max-width: 50%;
    margin-bottom: 2em;
}

.strip-divider {
    margin-bottom: 2em;
}


.orange {
    background-color: #df6b0f;
    animation: wiggle 1.5s infinite ease-in-out;
}

.purple {
    background-color: #a63886;
    animation: wiggle 1.5s infinite ease-in-out;
}

.blue {
    background-color: #1164b7;
    animation: wiggle 1.5s infinite ease-in-out;
}

.purple-text {
    color: #a63886;
}

.orange-text {
    color: #df6b0f;
}

.red-text {
    color: #f3333c;
}

.blue-text {
    color: #1164b7;
}



/* Apply Lora for specific elements */
.quote, .highlight, .highlight-left, .key-fact {
    font-family: 'Lora', serif;
    font-style: italic; /* Optional: Add style for quotes or highlights */
}

/* Example CSS class for quotes or key facts */
.quote {
    font-size: 1.8em;
    margin: 20px 0;
}

/* Example CSS class for highlighted text or key facts */
.key-fact {
    font-weight: 700; /* Bold for emphasis */
    font-size: 1.6em;
}

/* Adjust existing elements as needed */
p {
    line-height: 1.4em;
    font-size: 1.2em;
}

/* Ensure Montserrat bold is used for strong emphasis within body text */
strong, b {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}


.highlight-purple {
    background-color: #a63886; /* Light gray background */
    color: #fff; /* Dark text color */
    padding: 20px; /* Spacing inside the bubble */
    border-radius: 10px; /* Rounded corners */
    position: relative; /* Needed for absolute positioning of pseudo-elements */
    display: inline-block; /* Wrap the background tightly around the text */
    max-width: 80%; /* Adjust based on your layout */
    margin: 0 20px; /* Add some margin around the speech bubble */
}

.highlight-purple:before {
    content: ''; /* Required for :before and :after elements */
    position: absolute;
    bottom: -10px; /* Position just below the bubble */
    left: 10%; /* Center the tail below the bubble */
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent; /* Create the tail using borders */
    border-right: 10px solid transparent; /* Transparent sides */
    border-top: 10px solid #a63886; /* Color matches the bubble's background */
    transform: translateX(-50%); /* Center the tail with respect to its parent's width */
}

.highlight-turqoise {
    padding: 20px; /* Spacing inside the bubble */
    border-radius: 10px; /* Rounded corners */
    position: relative; /* Needed for absolute positioning of pseudo-elements */
    display: inline-block; /* Wrap the background tightly around the text */
    max-width: 80%; /* Adjust based on your layout */
    margin: 20px; /* Add some margin around the speech bubble */
}

.highlight-turqoise:before {
    content: ''; /* Required for :before and :after elements */
    position: absolute;
    bottom: -10px; /* Position just below the bubble */
    right: 10%; /* Center the tail below the bubble */
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent; /* Create the tail using borders */
    border-right: 10px solid transparent; /* Transparent sides */
    border-top: 10px solid #19c3c8; /* Color matches the bubble's background */
    transform: translateX(-50%); /* Center the tail with respect to its parent's width */
}

.turquoise {
   background-color: #19c3c8; /* Light gray background */
color: #333; /* dark text color */
}

.purple {
   background-color: #a63886; /* Light gray background */
color: #fff; /* light text color */
}





.container {
    width: 80%;
    margin: 0 auto;
    text-align: center; /* Center the text */
    max-width: 1500px;
}

header, section, footer {
    margin: 1em auto;
    max-width: 900px;
}

h1 {
    font-size: 4em;
}

h2 {
    font-size: 2.3em;
}

h3 {
    font-size: 2em;
}

h1, h2 {
    color: #333;
    font-family: 'Montserrat', sans-serif; /* Montserrat for headers */
    font-weight: 700; /* Bold weight for headers */
}

h1.ticker {
    color: #333;
    font-family: 'Montserrat', sans-serif; /* Montserrat for headers */
    font-weight: 700; /* Bold weight for headers */  
    font-size: 5em;
    margin-bottom: 0em;
    margin-top: 0.2em;
}

p {
    line-height: 1.1em;
    font-size: 1.5em;
}

ul {
    list-style-type: none;
    padding: 0; /* Remove padding to center list items */
}

li {
    margin-bottom: 1em;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

footer {
    background-color: #f2f2f2;
    padding: 1em 0;
}



.image-gallery {
    position: relative;
    width: 100%;
    height: 250px; /* Adjust as needed */
    overflow: hidden;
}

.image-gallery img {
    max-height: 100%; /* Adjust as needed */
    width:: 20%;
    opacity: 0;
    animation: fadeInImage 0.1s forwards;
}

.image-gallery-2 {
    position: relative;
    width: 100%;
    height: 160px; /* Adjust as needed */
    overflow: hidden;
}

.image-gallery-2 img {
    max-height: 90%; /* Adjust as needed */
    width:: 20%;
    opacity: 0;
    animation: fadeInImage 0.1s forwards;
}

.fade-in-image {
    animation-name: fadeInImage;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

.half-height {
    max-height: 60% !important; 
}

.two-thirds-height {
    max-height: 60% !important; 
}

.third-width {
    max-width: 33%;
}

.fifth-width {
    max-width: 20%;
}

.two-thirds-height {
    max-height: 75% !important; 
}


@keyframes fadeInImage {
    0% { opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 1.6; }
    100% { opacity: 2.8; }
}



/* ... animate slide in ... */

.background-slide-section {
    position: relative;
    width: 100%;
    height: 250px; /* Set the height you need */
    /*background-image: url('assets/.jpg');*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.background-slide-section img {
    position: absolute;
    width: auto; /* Keep the image aspect ratio */
}

/* Prepare for animation but don't start automatically */
.bus {
    top: 27%; /* Adjust the vertical position */
    right: -50%; /* Start off-screen to the right */
    height: 70%; /* Adjust based on actual image size */
}

/* Car moving left to right */
.car {    
    top: 69%; /* Adjust the vertical position so it does not overlap with the bus */
    right: -60%; /* Start off-screen to the right */
    height: 31%; /* Adjust based on actual image size */    
}

/* Man on bike moving right to left */
.bike {
    top: 65%; /* Adjust the vertical position */
    left: -100%; /* Start off-screen to the right */
    height: 35%; /* Adjust based on actual image size */
}



/* Animation activation class */
.animate-slide {
    animation-duration: 5s;
    animation-fill-mode: forwards;
}

/* Specify the animations with unique names for activation */
.bus.animate-slide {
    animation-name: slideLeftToRightBus;
}

.car.animate-slide {
    animation-name: slideLeftToRightCar;
    animation-delay: 0.5s; /* Start 0.5s after the bus */
}

.bike.animate-slide {
    animation-name: slideRightToLeftBike;
}


/* Static Images */
.static-left {
    top: -4%; /* Adjust the vertical position */
    right: 50%; 
    z-index: -1;
    height: 100%; /* Adjust based on actual image size */
}

.static-left-2 {
    top: 26%; /* Adjust the vertical position */
    right: 60%; 
    z-index: -1;
    height: 70%; /* Adjust based on actual image size */
}

.static-right {
    top: 15%; /* Adjust the vertical position */
    right: 70%; 
    z-index: -1;
    height: 80%; /* Adjust based on actual image size */    
}

.static-right-2 {
    top: 1%; /* Adjust the vertical position */
    right: 30%; 
    z-index: -1;
    height: 95%; /* Adjust based on actual image size */    
}

.static-right-3 {
    top: 18%; /* Adjust the vertical position */
    right:15%; 
    z-index: -1;
    height: 77%; /* Adjust based on actual image size */    
}



@keyframes slideLeftToRightBus {
    0% { right: -100%; }
    100% { right: 40%; } /* Ends off-screen to the left */
}

@keyframes slideLeftToRightCar {
    0% { right: -100%; }
    100% { right: 40%; } /* Ends off-screen to the left */
}

@keyframes slideRightToLeftBike {
    0% { left: -100%; }
    100% { left: 80%; } /* Ends off-screen to the right */
}

/* ... confused man & static images... */

#basics {
    clear: both;
    margin: 60px auto;
}

.man-left img {
    width: 15%;
    position: relative;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    float: left;
    -webkit-transform: scaleX(-1);
  -moz-transform: scaleX(-1);
  -o-transform: scaleX(-1);
  transform: scaleX(-1);
}

.woman-right img {
    float: left;
    width: 15%;
    position: relative;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.left-text {
    float: left;
    width: 33%;
    height: 3em;
}

.left-text-3{
    float: left;
    height: 3em;
}

.left-text-2 {
    float: left;
    width: 33%;
    margin-left: -10px;
}


.left-text-3 img{
    max-width: 33%;
}


.left-text img {
    max-width: 15%;
}

.left-text-half {
    float: left;
    width: 50%;
    padding-top: 3em;
    padding-bottom: 3em;
}

#more-things {
    height: 200px;
    margin-bottom: 4em;
}


#positive-loop {
    max-width: 95%;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 2em;
}

#positive-loop h2.highlight, #positive-loop h1 {
    margin-bottom: 20px;
}

#positive-loop .light-box img, #positive-loop .left-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px; /* Centers the image and adds space below */
}

#positive-loop .left-text {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
}

#positive-loop .left-text img {
    width: 30%; /* Adjust this value as needed */
    margin-bottom: 10px; /* Space below the image */
    float: none; /* Override any previous float styling if necessary */
}

#positive-loop .left-text p {
    width: 100%; /* Ensure the paragraph takes full width to move below the image */
    margin: 0 0 20px 0; /* Adjust margins as necessary */
}


.left-text-half {
    width: 50%; /* Take up half the width of the container */
    float: left; /* Float left to align side by side */
    box-sizing: border-box; /* Include padding and borders in the element's width */
    padding: 10px; /* Adjust padding as needed */
}

.full-width {
    clear: both; /* Clear the floating of previous elements */
    width: 100%; /* Take up the full width */
    box-sizing: border-box; /* Include padding and borders in the element's width */
    padding: 10px; /* Adjust padding as needed */
}

.light-box img {
    width: 100%; /* Make images responsive to their container's width */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Ensure images are block-level for margin adjustments */
    margin: 0 auto; /* Center the images if they're not already */
    transition: transform 0.3s ease;
}

/* Animation keyframes for wiggle */
@keyframes wiggle {
    0%, 100% {
        transform: rotate(-1deg);
    }
    50% {
        transform: rotate(1deg);
    }
}

/* Applying the wiggle animation to images within .light-box classes */
img.text-overlay {
    animation: wiggle 1.5s infinite ease-in-out;
}

/* Animation keyframes */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05); /* Adjust scaling factor as needed */
    }
    100% {
        transform: scale(1);
    }
}

/* Applying the animation to images within .light-box classes */
.light-box-pulse img {
    animation: pulse 2s infinite ease-in-out; /* Adjust timing as desired */
        max-width: 100%;
}


/* Clear floats after the floated elements */
#positive-loop:after {
    content: "";
    display: table;
    clear: both;
}

p.clear {
    clear: both;
}

#is-this-going-to-be-hard {
    max-width: 90%;
    margin: 0 auto;
    text-align: center; /* Center the text */
}

.speech-wrapper {
    display: flex;
    flex-direction: row; /* Ensure items are in a row */
    align-items: center;
    margin: 20px 0; /* Reduced margin for tighter spacing */
    clear: both;
    max-width: 40%;
}

.speech-wrapper:nth-child(1) {
    float: right;
    justify-content: flex-end; /* Align items to the right for the middle wrapper */
     max-width: 50%;
    margin: 0 auto;
}


.speech-wrapper:nth-child(2) {
    float: left;
    justify-content: flex-start; /* Align items to the left for the other wrappers */
     max-width: 40%;
    margin: 20px auto;
}

.speech-wrapper:nth-child(3) {
    float: right;
    justify-content: flex-end; /* Align items to the right for the middle wrapper */
    max-width: 45%;
    margin: -185px auto;
}


.speech-wrapper p {
    font-size: 1.5em;
    max-width: %; /* Adjusted max-width to reduce separation */
    color: #ffffff;
    position: relative; /* Ensure text is above the background */
    z-index: 2;
    margin: 0; /* Remove default margin */
}

.speech-wrapper-2 p {
    font-size: 1.5em;
    max-width: %; /* Adjusted max-width to reduce separation */
    color: #black;
    position: relative; /* Ensure text is above the background */
    z-index: 2;
    margin: 0; /* Remove default margin */
}

.speech-image {
    flex-shrink: 0; /* Prevent the image from shrinking */
    width: 100px; /* Adjust as needed */
    height: auto;
    margin-right: 10px; /* Adjusted spacing around the image */
}

.speech-colour-1, .speech-colour-2, .speech-colour-3 {
    padding: 20px;
    background-repeat: no-repeat;
    background-position: center;
    display: flex; /* Changed to flex to better control layout */
    align-items: center; /* Vertically center the text */
    justify-content: center; /* Horizontally center the text */
    position: relative;
    width: 100%; /* Ensure full width to utilize flex properties */
}

.speech-colour-1 {
    background-size: 110%; 
    padding: 88px 55px 75px 57px;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 400 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100,50 Q50,50 50,150 Q50,250 150,250 Q200,300 250,250 Q350,250 350,150 Q350,50 250,50 Q150,50 100,50z' fill='%23f0a' stroke='%23f0a' stroke-width='8' /%3E%3C/svg%3E");
    color: #f0a;
}

.speech-colour-2 {
    background-size: 130%;
    padding: 88px 55px 75px 57px;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 400 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100,50 Q50,50 50,150 Q50,250 150,250 Q200,300 250,250 Q350,250 350,150 Q350,50 250,50 Q150,50 100,50z' fill='%230af' stroke='%230af' stroke-width='8' /%3E%3C/svg%3E");
    color: #0af;
}

.speech-colour-3 {
    background-size: 120%;
    padding: 60px 30px 50px 30px;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 400 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100,50 Q50,50 50,150 Q50,250 150,250 Q200,300 250,250 Q350,250 350,150 Q350,50 250,50 Q150,50 100,50z' fill='%23af0' stroke='%23af0' stroke-width='8' /%3E%3C/svg%3E");
    color: #af0;
}

p.black {
    color: #000000 !important; 
}

/* Clear floats */
#is-this-going-to-be-hard::after {
    content: "";
    display: table;
    clear: both;
}



/* Map sections */


.map-container {
    text-align: center; /* Centers the text blocks */
    margin: 0 auto; /* Optional: Centers the container */
}

.image-overlay-container {
    margin-top: 5em;
    margin-bottom: 2em;
    position: relative; /* Allows absolute positioning inside */
    display: inline-block; /* Allows size to fit content */
    width: 100%;
}

.sixty-percent {
    width: 60%; /* Adjust based on your needs */
    height: auto; /* Maintains aspect ratio */
}

.eighty-percent {
    width: 80%; /* Adjust based on your needs */
    height: auto; /* Maintains aspect ratio */
}

.onehundred-percent {
    width: 100%; /* Adjust based on your needs */
    height: auto; /* Maintains aspect ratio */
}



.fifty-percent {
    width: 50%; /* Adjust based on your needs */
    height: auto; /* Maintains aspect ratio */
}

.overlay-text {
    position: absolute;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjusts for the text's own size */
    color: #fff; /* Example text color */
    background-color: rgba(25, 195, 200, 0.8); /* Semi-transparent background */
    padding: 5px 10px; /* Some padding around the text */
}

.overlay-text-left {
    width:15%;
    position: absolute;
    top: 25%; /* Center vertically */
    left: 17%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjusts for the text's own size */
    color: #fff; /* Example text color */
    background-color: rgba(25, 195, 200, 0.5); /* Semi-transparent background */
    padding: 5px 10px; /* Some padding around the text */
}

.overlay-text-right {
    width:15%;
    position: absolute;
    top: 50%; /* Center vertically */
    right: -3%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjusts for the text's own size */
    color: #fff; /* Example text color */
    background-color: rgba(25, 195, 200, 0.5); /* Semi-transparent background */
    padding: 5px 10px; /* Some padding around the text */
}

.overlay-image {
    position: absolute;
    top: 55%; /* Adjust this value to position the overlay image */
    left: 48%; /* Adjust this value to position the overlay image */
    width: 100%; /* Example width, adjust as needed */
    height: auto; /* Maintains aspect ratio */
    transform: translate(-50%, -50%); /* Center the image if necessary */
}

/* ... circle loops ... */

.circle-container-1 {
  position: relative;
  width: 55%;
  height: 200px;
  margin: 60px auto;
}

.circle-container-2 {
  position: relative;
  width: 55%;
  height: 200px;
  margin: 40px auto;
}

.text-block {
  width: 150px;
  position: absolute;
  opacity: 1;
  /*animation: appearAndDisappear 12s infinite; /* Adjust total duration to 12s */
  /*animation-fill-mode: forwards;*/
}

#block1 {
    background-color: #19c3c8;
    border-radius: 10px;
    padding: 0.5em;
}

#block2 {
    background-color: #a63886;
    border-radius: 10px;
    padding: 0.5em;
}

#block3 {
    background-color: #df6b0f;
    border-radius: 10px;
    padding: 0.5em;
}

#block4 {
    background-color: #1164b7;
    border-radius: 10px;
    padding: 0.5em;
}

#block5 {
    background-color: #11d20f;
    border-radius: 10px;
    padding: 0.5em;
}

#block6 {
    background-color: #df6b0f;
    border-radius: 10px;
    padding: 0.5em;
}



/* Adjusted positioning for demonstration */
#block1 { top: 0%; left: 43%; transform: translate(-50%, -100%); }
#block2 { top: 28%; left: 100%; transform: translate(-100%, -50%); }
#block3 { top: 80%; left: 70%; transform: translate(-50%, 0%); }
#block4 { top: 80%; left: 5%; transform: translate(0%, -50%); }
#block5 { top: 30%; left: 17%; transform: translate(-50%, -50%); }
#block6 { top: 80%; left: 50%; transform: translate(-50%, 0%); }


/* New keyframes to include disappearance */
@keyframes appearAndDisappear {
  0%, 15% { opacity: 0; }
  16%, 19% { opacity: 1; }
  96%, 100% { opacity: 0; } /* All disappear at the end */
}

#block2 { animation-delay: 1s; }
#block3 { animation-delay: 2s; }
#block6 { animation-delay: 2s; }
#block4 { animation-delay: 3s; }
#block5 { animation-delay: 4s; }


/* impact-images */

#real-impact {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Creates two columns */
    gap: 20px; /* Adjust the gap between grid items as needed */
    max-width: 70%;
    margin: 0 auto;

}

.grid-item {
    display: flex; /* Use flexbox within each grid item for layout */
    flex-direction: column; /* Stack the image and text vertically */
    align-items: center; /* Center-align the items horizontally */
}

.grid-item h3 {
    font-size: 1.5em;
}

.impact-image {
    width: 60%; /* Adjust as needed */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 10px; /* Space between the image and the text */
    opacity: 0; /* Start invisible */
}

/* Define the animation in a separate class */
.animate {
    animation: fadeInImage 1s forwards;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Add delays to the animations */
.impact-image:nth-of-type(1) { animation-delay: 0s; }
.impact-image:nth-of-type(2) { animation-delay: 1s; } /* Delay so they appear one by one */
.impact-image:nth-of-type(3) { animation-delay: 2s; }
.impact-image:nth-of-type(4) { animation-delay: 3s; }

.left { /* Adjust this class as needed for the text */
    width: 100%; /* Ensures text uses the full width of its container */
    text-align: center; /* Center-align the text */
}

/* house and car animation */


#houses {
    width: 100%;
    overflow: hidden; /* Ensure floated elements are contained */
}

.left, .right {
    width: 50%;
    float: left; /* Make sure both .left and .right are floated in the same direction for simplicity */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Container for the house image */
.house-container {
    margin: 0 auto; /* Center the container */
}

.house-container img {
    animation: growHouse 2s ease-in-out forwards;
}

@keyframes growHouse {
    from {
        transform: scale(0.2); /* Start from 20% of the size */
    }
    to {
        transform: scale(1); /* Grow to 100% of its original size */
    }
}

/* Container for the cars */
.car-container {
    margin: 0 auto; /* Center the container */
    display: grid;
    /*grid-template-columns: repeat(3, 1fr); /* Create a 3-column grid */
    grid-gap: 5px; /* Adjust gap as needed */
    max-width: 66%;
}


/* Placeholder for car appearance animation */
@keyframes appearCar {
    to {
        opacity: 1;
    }
}

/* Apply the animation to each car with a staggered delay */
.car-container img {
    animation: appearCar 0.1s forwards;
    width: 100%;
    transition: opacity 0.1s; /* Transition for the fade-in effect */
    opacity: 0;
}

.car-container img:nth-child(1) { animation-delay: 5s; }
.car-container img:nth-child(2) { animation-delay: 5.2s; }
.car-container img:nth-child(3) { animation-delay: 5.3s; }
.car-container img:nth-child(4) { animation-delay: 5.4s; }
.car-container img:nth-child(5) { animation-delay: 5.5s; }
.car-container img:nth-child(6) { animation-delay: 5.6s; }
.car-container img:nth-child(7) { animation-delay: 5.7s; }
.car-container img:nth-child(8) { animation-delay: 5.8s; }
.car-container img:nth-child(9) { animation-delay: 5.9s; }
.car-container img:nth-child(10) { animation-delay: 6s; }
.car-container img:nth-child(11) { animation-delay: 6.1s; }
.car-container img:nth-child(12) { animation-delay: 6.2s; }


.house-container img {
    max-width: 80%; /* Full width of the container */
    position: relative;
    display: block; /* Correct block display */
    transition: transform 2s; /* Smooth transition for growing effect */
    transform: scale(0.2); /* Start at 20% of the size */
    margin: 0 auto;
}

.full-width {
        clear: both;
}

.car-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    grid-gap: 5px; /* Gap between cars */
    justify-content: center; /* Center grid in the container if it's smaller than the available space */
    margin: 0 auto; /* Center the container */
}

.car-container img {
    width: 100%; /* Each car takes full width of its cell */
    transition: opacity 0.1s; /* Transition for the fade-in effect */
    opacity: 0; /* Cars start out invisible */
}

/* Animation to grow the house from 20% to 100% of its size */
@keyframes growHouse {
    to {
        transform: scale(1); /* Grow to full size */
    }
}

/* Animation to make each car appear one by one */
@keyframes appearCar {
    to {
        opacity: 1; /* Make car fully visible */
    }
}

/* Trigger the animations when the .animate class is added by the Intersection Observer */
.animate.house-container img {
    animation: growHouse 2s forwards;
}

.animate.car-container img {
    animation: appearCar 1s forwards;
}

.left, .right {
    float: left; /* Floats the .left class to the left */
    width: 50%; /* Assigns 50% of the container's width to the .left class */
    box-sizing: border-box; /* Ensures padding and border are included in the width */
}

.right {
    float: right; /* Floats the .right class to the right */
}

/* Clearfix for the parent container */
#houses:after {
    content: "";
    display: table;
    clear: both;
}


/* Adjustments for the house and car container widths */
.house-container {
    width: 50%; /* Maximum width for the house and car containers */
    margin: 0 auto; /* Center the containers */
}


#exceptions {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Adjusted for 3 items per row on mobile */
    gap: 50px 20px;
    padding: 20px;
}

.grid-item {
    /*background: #f0f0f0;*/
    /*border-radius: 10px;*/
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* This ensures content is pushed to the bottom */
    align-items: center;
    padding: 10px;
}

.grid-item img {
    max-width: 100%; /* Adjusted max-width for specific images like .motorbike */
    height: auto;
    margin-bottom: 10px; /* Directly controls the space between the image and the paragraph */
}

.grid-item p {
    text-align: center; /* Centers the text within its container */
    width: 100%; /* Ensures the paragraph takes full width */
    font-size: 1em;
}

img.motorbike {
    max-width: 30%;
}

h3 {
    width: 100%; /* Makes the <h3> span the full width */
    text-align: center; /* Center-align the text */
}


.circle-container-1 {
    background-image: url('assets/5. Fed up driver.png'); /* Path to your arrow image */
    background-size: 20%;
    background-repeat: no-repeat;
    background-position: center;
}

.circle-container-2 {
    background-image: url('assets/5.Hand car keys.png'); /* Path to your arrow image */
    background-size: 20%;
    background-repeat: no-repeat;
    background-position: center;
}

.passes-per-household {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center; /* Ensure items are aligned in the middle */
  margin-top: 15px;
}

.fade-in, .arrow {
  opacity: 1;
  animation: fadeInAnimation ease 2s;
  animation-fill-mode: forwards;
}

.arrow-container {
  display: flex;
  flex-direction: column; /* Stack arrows on top of each other */
  align-items: center; /* Center the arrows horizontally in the container */
  gap: 50px; /* Adjust the gap between arrows */
}

.arrow {
  width: 50px; /* Adjust based on your actual arrow image size */
  height: auto;
  animation: none; /* Remove animation if you don't want arrows to fade in */
}

.pass-image1 {
  max-width: 30%; /* Adjust if necessary to control image sizes */
}

.pass-image2 {
  max-width: 12%; /* Adjust if necessary to control image sizes */
}

.pass-image3 {
  max-width: 20%; /* Adjust if necessary to control image sizes */
}

.pass-image1 {
  animation-delay: 0s;
}

.pass-image2 {
  animation-delay: 2s;
}

.pass-image3 {
  animation-delay: 4s;
}

.tick-image {
    max-width: 5%;
    margin-bottom: 5px;
}

.tick-image-2 {
    max-width: 5%;
    margin-bottom: 5px;
    margin-top: 40px;
}

@keyframes fadeInAnimation {
  from { opacity: 0; }
  to { opacity: 1; }
}

.traffic-jam {
    background-image: url('assets/6. Katy Highway.jpg'); /* Path to your arrow image */
    background-size: cover ;
    padding: 50px;
}

.traffic-jam h1 {
    font-size: 3.5em;
    color: #ffffff;
}

.traffic-nice {
    max-width: 80%; /* or a specific px value */
    margin: 0 auto; /* Centers the element */
    display: block; /* Ensures the element is treated as a block */
}

.traffic-nice img {
    width: 100%; /* Make the image responsive */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Correct display */
}

.color-block-overlay {
    position: relative;
    display: inline-block; /* Or 'block' depending on layout */
}

.text-overlay {
    width: 100%; /* Adjust based on your layout needs */
    display: block; /* Ensure it takes up its own line */
}

.block-overlay-text {
    position: absolute;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust to perfectly center */
    color: #FFF; /* Text color */
    font-size: 1em; /* Adjust based on your layout needs */
    z-index: 2; /* Ensure text appears above the background image */
    width: 95%;
}

.block-overlay-text li {
    margin-bottom: 0;
}

/* Ensure the text is readable and stands out */
.block-overlay-text {
    padding: 5px 10px; /* Adjust as needed */
    border-radius: 5px; /* Optional: for rounded corners */
    font-size: 1.5em;
}


.social-links {
  display: flex; /* Use Flexbox to layout the links in a row */
  justify-content: space-around; /* Evenly space the links within the container */
  align-items: center; /* Align items vertically in the center */
  max-width: 40%;
  margin: 0 auto;
}

.social-links a {
  display: inline-flex; /* Keep the link elements inline and use Flexbox for alignment */
  align-items: center; /* Align the content (images) vertically in the center */
  margin: 0 10px; /* Optional: add some space between each link */
}

.social-links a img {
  height: 40px; /* Adjust based on your preference */
  width: auto; /* Maintain aspect ratio */
}

@keyframes point {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px); /* Adjust the value to control the pointing motion distance */
    }
}

.pointing-finger {
    position: absolute;
    bottom: -20px; /* Move the finger to the bottom of the light-box image, adjust as needed */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Adjust for precise centering */
    z-index: 2; /* Ensure the finger is layered above the light-box image */
    animation: point 1s ease-in-out infinite; /* The pointing animation */
    height: auto; /* Maintain aspect ratio */
    width: 15%; /* Adjust based on your preference */
}

@keyframes point {
    0%, 100% { transform: translateY(0) translateX(-50%); }
    50% { transform: translateY(-20px) translateX(-50%); }
}

.light-box-long.light-box {
    /* Your existing styles for the light-box */
    display: flex;
    justify-content: center; /* Center the light-box image if necessary */
    position: relative; /* Ensure this doesn't interfere with positioning */
    z-index: 1; /* Ensure it's layered correctly with the finger image */
}

.image-group {
    position: relative; /* Establishes a positioning context for absolute positioning */
    display: inline-block; /* Or 'block', depending on your layout needs */
    margin-bottom: 20px; /* Space below the group, adjust as needed */
}

.quotes {
    font-style: italic;
    max-width: 33%;
    float: left;
}

.quotes-2 {
    font-style: italic;
    max-width: 50%;
    float: left;
}



#find-out-more {
    max-width: 80%;
    margin: 0 auto;
}

#find-out-more p {
    font-size: 1.1em;
    text-align: justify;
    text-justify: auto;
}


#email-embed {
    max-width: 70%;
    margin: 0 auto;
    padding-bottom: 30px;
    text-align: center;
}


/* Media Queries for mobile */

@media screen and (max-width: 768px) {
    .container {
        width: 95%;
    }

    h1 {
        font-size: 4em;
    }

    #more-things {
    height: 150px;    
    margin-bottom: 1em;
    }


    .house-container h1 {
        font-size: 3em;
    }

    .house-container h2 {
        font-size: 1.8em;
    }

    .house-container-2 h1 {
        font-size: 3em;
    }

    .house-container-2 h2 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 2em;
    }

    h3 {
        font-size: 1.5em;
    }

    .image-gallery img, .image-gallery-2 img, .background-slide-section img, .man-left img, .woman-right img {
        max-width: 100%;
        max-height: auto;
    }

    .image-gallery, .background-slide-section {
        max-height: 115px;
    }

    .image-gallery-2, {
        max-height: 90px;
    }

    .circle-container-1, .circle-container-2, .map-container, .image-overlay-container {
        width: 100%;
    }

    p, .quote, .key-fact {
        font-size: 1.3em;
    }

    /*.grid-container {
        grid-template-columns: 1fr; /* Stack grid items vertically on small screens */
/*        width: 45%;*/
/*    }*/

    /* Adjust the navigation menu, form inputs, buttons, etc., for better touch interaction */

    a, button {
    padding: 10px 20px; /* Increase as needed */
    min-width: 48px;
    min-height: 48px;
    font-size: 1em; /* Adjust for readability */
    }

    .social-links a {
    padding: 10px 10px; /* Increase as needed */        
    }

    .social-links a img {
    height: 4em;    
    }

    .overlay-text-left, .overlay-text-right {
    font-size: 0.8em;   
    }

    h2.overlay-text {
    font-size: 1.2em;   
    }

    .overlay-text-left {
        width: 15%;
    }

    .overlay-text-right {
        width: 15%;
        right: -4%;        
    }

    .traffic-nice {
        max-width: 100%; /* Allows the element to fit within the smaller viewport */
        margin: 0 auto; /* Keep centering */
    }

    .speech-wrapper p {
    font-size: 1em;
    color: #ffffff;
    position: relative; /* Ensure text is above the background */
    z-index: 2;
    padding: 25px 20px;
    }

    #real-impact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    }

    .grid-item h3 {
    font-size: 1em;
    }

    .grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Sets up three columns */
    gap: 20px; /* Adjust gap for better mobile viewing */
    padding: 20px;
    }

    .grid-container {
        font-size: 0.8em;
    }

    .speech-wrapper:nth-child(3) {
        margin: 0 auto;
        max-width: 65%;
    }

    .speech-wrapper:nth-child(2) {
     max-width: 65%;
    }

    .speech-wrapper {
        max-width: 65%;
    }

    .speech-wrapper p{
        min-width: 65%;
        padding: 60px 30px 62px 30px;
    }

    .quarter-width {
        max-width: 25%;
    }

    .social-links {
        max-width: 100%;
    }
   
    .man-left img {
    width: 30%;
    margin-top: 3em;
    }

    .left-text img {
    max-width: 45%;
    }
    #positive-loop {
    margin-bottom: 1em;
    }
    .top-margin {
    margin-top: 1em;    
    }
    .half-width {
    max-width: 50%;    
    }
    .third-width {
    max-width: 33%;    
    }
    .fifth-width {
    max-width: 20%;    
    }

    .half-width {
    max-width: 50%;    
    }

}

@media screen and (prefers-reduced-motion: reduce) {
  .animate { animation: none !important; }
}





