#svg-container {
    position: sticky;
    top: 100px;
    height: 3000px;
    text-align: center;
    margin-bottom: 500px;
}

#line-svg {
    overflow: visible;
}

#dot {
    fill: darkred;
    stroke: white;
    stroke-width: 2;
}
#motion-path {
    stroke: lightblue;
    stroke-width: 6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body {

    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f4f4f9;
}
/* #intro {
   min-height: 300px;
} */
#videostory {
    transition: width 0.3s ease;
    padding: 0;
}
.stat-container {
    min-height: 760px;
    /* width: 100%; */
    /* background: url("https://images.unsplash.com/photo-1597756906188-83c0fcbd02ce?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/*  */
.parent {
	display: flex;
	width: 50%;
	height: 100vh;
	overflow: hidden;
}
.child {
	height: 100%;
	width: 100%;
	background-image: url(images/stat-red-lake-background.jpg);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	transition:3s;
    background-color: #ffffff;
    backdrop-filter: blur(5px) ;
}

.stat-box h3 {
    color: #ffffff;
}
.stat-card hr {
    border: 2px solid #fff;
    opacity: 100;
    border-radius: 5px;
    max-width: 130px;
    text-align: center;
    margin: 0 auto;
    margin-bottom: 10px;
}
.stat-card {
    background: #7a0019;
    border-radius: 10px;
    min-height: 271px;
    max-width: 300px;
    padding: 20px;
    margin: 0 auto 15px auto;
    width: 65%;
    /* Sleek Animation Properties */
        transition: 
            transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), /* Smoother lift */
            box-shadow 0.3s ease-out; /* Smoother shadow change */    
    }
    .stat-card:hover {
        transform: translateY(-10px);
        border: 1px solid #ffffff61;
        box-shadow: -5px 6px 20px #ffffff47;
    }

/*  */

header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    text-align: center;
}

header nav ul {
    list-style: none;
    padding: 0;
}

header nav ul li {
    display: inline;
    margin-right: 15px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
}



section {
    margin-bottom: 20px;
    padding: 20px;
}
.home-intro {
    text-align: center;
    padding: 15% 25%;
    width: 55% !important;
}

.home-intro h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #7a0019;
}
.home-intro p {
    font-size: 1.2rem;
    color: #333333;
}
section#stats, section#partners {
    min-height: 80vh;
}
#partners p {
    text-align: center;
}
section h2, section p {
    margin-top: 0;
    text-align: center;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    bottom: 0;
    width: 100%;
}

#videostory {
    position: relative;
    /* width: 100vw;
    height: 100vh;
    overflow: hidden; */
    transition: width 0.3s ease;
}

#videostory iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* pointer-events: none; */
     /* Ensure clicks go through to the controls */
}

#videostory .overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    font-size: 2rem;
    z-index: 1;
    pointer-events: none; /* Ensure clicks go through to the video */
}
/* Video section on scroll */
.scalable-container, .scalable-bg, .scalable-partner {
    /* Set the initial (minimum) width */
    width: 60%;
    margin: 50px auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    
    /* The 'transition' property is no longer needed */
  }
  
  .scalable-container img, .scalable-bg img, .scalable-partner img {
    display: block;
    width: 100%;
    height: auto;
  } 


  /* Card boxes styles */
  .cards-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px; /* Space between cards */
}

.card-container {
    /* Defines the 3D space for the card to move in */
    transform-style: preserve-3d;
}

.card {
    min-height: 500px;
    /* width: 450px; */
    background: linear-gradient(135deg, #4c5c96, #2c3e50);
    color: white;
    border-radius: 20px;
    padding: 30px;
    box-sizing: border-box;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

    /* The magic for the smooth return animation */
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    
    /* Elements inside the card will also be in 3D space */
    transform-style: preserve-3d;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card {
    width: 400px;
    position: relative;
    height: 500px;
    background-repeat: no-repeat;
    /* // fallback */
    background: url(images/stories-tab-bg.png); 
    background-image: /* Top layer: a semi-transparent white gradient */ linear-gradient(rgb(113 2 2 / 79%), rgba(255, 255, 255, 0.9)), /* Bottom layer: your actual image */ url(images/stories-tab-bg.png);
    background-size: cover;
}
.card p span.Location {
    color: #000;
    font-weight: 600;
    background: #ffde7a;
    padding: 0px 9px;
    line-height: 2rem;
}
.card img {
    width: 250px;
    position: absolute;
    bottom: -3px;
    right: -30px;
    opacity:0;
    transition: opacity 1s ease-in-out;
}
.card:hover img {
    opacity:1;
    transition: opacity 1s ease-in-out;
}
.card:hover .circles {
    opacity:1;
    transition: opacity 1s ease-in-out;
}
.circles {
    position: absolute;
    z-index: 1000;
    opacity:0;
    transition: opacity 1s ease-in-out;
}
.card-2 {
    background: url(images/card-st-cloud-campus.jpg);
    background-image: /* Top layer: a semi-transparent white gradient */ linear-gradient(rgb(113 2 2 / 79%), rgba(255, 255, 255, 0.9)), 
    /* Bottom layer: your actual image */ url(images/card-st-cloud-campus.jpg);
}
.card-3 {
    background: url(images/card-duluth.jpg);
    background-image: /* Top layer: a semi-transparent white gradient */ linear-gradient(rgb(113 2 2 / 79%), rgba(255, 255, 255, 0.9)), 
    /* Bottom layer: your actual image */ url(images/card-duluth.jpg);
}
.card-4 {
    background: url(images/card-moose.jpg);
    background-image: /* Top layer: a semi-transparent white gradient */ linear-gradient(rgb(113 2 2 / 79%), rgba(255, 255, 255, 0.9)), 
    /* Bottom layer: your actual image */ url(images/card-moose.jpg);
}
.card-5 {
    background: url(images/card-ummc.jpg);
    background-image: /* Top layer: a semi-transparent white gradient */ linear-gradient(rgb(113 2 2 / 79%), rgba(255, 255, 255, 0.9)), 
    /* Bottom layer: your actual image */ url(images/card-ummc.jpg);
}
.card-6 {
    background: url(images/card-campus.jpg);
    background-image: /* Top layer: a semi-transparent white gradient */ linear-gradient(rgb(113 2 2 / 79%), rgba(255, 255, 255, 0.9)), 
    /* Bottom layer: your actual image */ url(images/card-campus.jpg);
}

.card-1 .circles, .card-6 .circles {
    bottom: -87px;
    right: -43px;
}

.card-2 .circles {
    bottom: -60px;
    right: -30px;
}

.card-3 .circles {
    bottom: -25px;
    right: -75px;
}

.card-4 .circles, .card-5 .circles {
    bottom: -150px;
    right: -95px;
    height: 85%;
    width: 100%;
    }


.circles {
  height: 30vmin;
  /* position: relative; */
  width: 30vmin;
  
  > div {
    animation: growAndFade 3s infinite ease-out;
    background-color: gold;
    border-radius: 50%;
    height: 100%;
    opacity: 0;
    position: absolute;
    width: 100%;
  }
  
  .circle1 {
    animation-delay: 1s;    
  }
  .circle2 {
    animation-delay: 2s; 
  }
  .circle3 {
    animation-delay: 3s;
  }
}

@keyframes growAndFade {
  0% {
    opacity: .5;
    transform: scale(0);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}


.card h2 a {
    color: #ffffff;
}
.card.blue {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.card.green {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;

    height: 60vh;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 400;
    /* Pushes the title forward in 3D space for a parallax effect */
    transform: translateZ(50px);
    text-rendering: geometricPrecision;
    color: #ffffff;
    text-decoration: none;
}
.card-title a {
    color: #ffffff;
    text-decoration: none;
}
.card-title a:hover {
    text-decoration: underline;
    color: #ffde7a;
}

.card-content {
    font-size: 1rem;
    line-height: 1.4;
    transform: translateZ(30px);
    color: #000000;
    text-rendering: geometricPrecision;
    letter-spacing: 0.5px;
}
.card-content p {
    color: #ffffff;
}
.card.green {
    background: url("https://images.unsplash.com/photo-1597756906188-83c0fcbd02ce?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}



.stat-container {
  padding: 10% 25%;
}
.stats-container, .stat-container h2, .stat-container p {
    color: #ffffff;
}
.stat-box {
    text-align: center;
}


/* Styles for boat background */
.animecontainer {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    /* background-color: #81b8e3; */
    overflow: hidden;
    z-index: -1;
}

.boat-container {
    width: 100%;
    height: 100vh;
    /* background-color: #81b8e3; */
    /* background-image: url("images/waterwave.svg"); */
    background-size: cover;
    background-position: center;
    position: fixed;
    background-repeat: no-repeat;
    overflow: hidden;
    animation: vibrate-1 0.3s linear infinite both;
}

.water-wave img {
    width: 100%;
    height: 100vh;
    /* object-fit: cover; */
    /* position: absolute; */
    top: 0;
    left: 0;
    z-index: 1;
    transform: scale(.9);
    filter: blur(30px);
}

.water-wave {
    /* position: absolute; */
    top: 39%;
    right: 560px;
    z-index: 3;
    opacity: 1;
    animation: 
        wave 15s cubic-bezier(0.4, 0, 0.2, 1) infinite,
         1s ease-in-out 4s;
         /* -webkit-animation: vibrate-1 0.3s linear infinite both;
	        animation: vibrate-1 0.3s linear infinite both; */
}
@-webkit-keyframes vibrate-1 {
  0% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }
  20% {
    -webkit-transform: translate(-2px, 2px);
            transform: translate(-2px, 2px);
  }
  40% {
    -webkit-transform: translate(-2px, -2px);
            transform: translate(-2px, -2px);
  }
  60% {
    -webkit-transform: translate(2px, 2px);
            transform: translate(2px, 2px);
  }
  80% {
    -webkit-transform: translate(2px, -2px);
            transform: translate(2px, -2px);
  }
  100% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }
}
@keyframes vibrate-1 {
  0% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }
  20% {
    -webkit-transform: translate(-2px, 2px);
            transform: translate(-2px, 2px);
  }
  40% {
    -webkit-transform: translate(-2px, -2px);
            transform: translate(-2px, -2px);
  }
  60% {
    -webkit-transform: translate(2px, 2px);
            transform: translate(2px, 2px);
  }
  80% {
    -webkit-transform: translate(2px, -2px);
            transform: translate(2px, -2px);
  }
  100% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }
}

.boat-start img {
    width: 100vw;
    height: 100vh;
    display: block;
    max-width: 100%;
    object-fit: contain;
}
.boat-start {
    position: absolute;
    top: 39%;
    right: 560px;
    z-index: 3;
    opacity: 1;
    animation: 
        speedboat 15s cubic-bezier(0.4, 0, 0.2, 1) infinite,
         1s ease-in-out 4s ;
}

.boat-start img {
    width: 100px;
    height: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
}


/* Speedboat animation - smooth, realistic motion with natural bobbing and rocking */
@keyframes speedboat {
    0% {
        transform: translateY(200px) translateX(-200px) rotate(0deg);
    }
    100% {
        transform: translateY(-800px) translateX(700px) rotate(10deg);
    }
}
@keyframes wave {
    0% {
        transform: translateY(540px) translateX(-400px) rotate(0deg);
    }
    100% {
        transform: translateY(-675px) translateX(600px) rotate(10deg);
        filter: blur(80px) ;
    }
    /* from {
    clip-path: inset(0 0 100% 100%); 
  }
  
   End: The element is 0% "clipped" (fully visible) 
  to {
    clip-path: inset(0 0 0 0);
  } */
}
/* Fade out animation for boat-start */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Fade in animation for boat-end */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 767.98px) {
    section {
        padding: 20px 0;
    }
    #stories .card {
        width: 90%;
        margin: 0 5%;
        background-size: cover;
    }
    .cards-wrapper {
        display: block;
        overflow: hidden;
        width: 102.5%;
    }
    .stats-wrapper.row {
        margin-top: 140px;
    }
    .child {
        background-size: contain;
        background-position: top left;
    }
    .card-container {
        margin-bottom: 30px;
    }
    .parent {
        height: auto;
    }
    .stat-card {
        width: 100%;
    }
    .boat-start {
        right: 20px;
        top: 45%;
    }
    
    .boat-start img {
        width: 200px;
        max-width: 100%;
    }
    
    .boat-end {
        right: 10px;
        top: 10%;
    }
    
    .boat-end img {
        width: 150px;
        max-width: 100%;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .boat-start {
        right: 200px;
    }
    
    .boat-end {
        right: 100px;
    }
}