* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    justify-content: center;
    align-items: center;
    height: 100vh;
    min-height: 100vh; /* Changed from height to min-height for better responsiveness */
    background-image: url("https://cdn.shopify.com/s/files/1/0895/0952/7853/files/Starry-background.webp?v=1737124314");
    background-size: 600px; /* Adjusted to a fixed pixel size for natural star scaling */
    background-position: center;
    background-attachment: fixed;
    image-rendering: -webkit-optimize-contrast; /* Improves rendering in WebKit browsers */
    image-rendering: crisp-edges;
    background-repeat: repeat;
    overflow-x: hidden;
}

#ourstory, #whatsnext {
    color: #ccc;
    padding-left: 20px;
}

/* Hero section */
.hero {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    gap: 20px;
}

.hero-content {
    position: relative; /* Changed from absolute */
    max-width: 700px;
    padding: 20px;
    flex-direction: column;
    border-style: ridge;
    border-color: black;
    backdrop-filter: blur(30px);
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.37);
    background-color: rgba(0, 255, 255, 0.263);
    margin: 20px auto; /* Center the element horizontally */
    text-align: center;
}

.hero-content p {
    font-size: 1rem;
    font-family: 'Times New Roman', Times, serif;
}

.hero-content h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
}

.journey-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.journey-image {
    display: flex; 
    justify-content: center;
    position: relative; 
}

.journey-image img {
    max-width: 600px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-style: ridge;
    border-color: black;
}

p {
    line-height: 1.5;
}

/* Community Giving Section Styles */
.community-giving {
    padding: 50px;
    text-align: center;
}

.community-giving h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black, 0 0 15px blue, 0 0 10px cyan;
}

.giving-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.giving-event {
    backdrop-filter: blur(30px);
    background-color: rgba(0, 255, 255, 0.263);
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    max-width: 350px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.giving-event:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.giving-event h3 {
    font-size: 1.75rem;
    color: white;
    margin-bottom: 10px;
}

.giving-event p {
    font-size: 1rem;
    color: #d2d2d2;
    line-height: 1.6;
}

/* Image Grid */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal-width columns */
    gap: 20px;
    max-width: 800px;
    width: 100%;
    padding: 20px;
    margin: 20px;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    justify-content: center;
}

.image-item {
    border: 2px solid black;
    box-shadow: black;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 5px cyan,0 4px 8px rgba(0, 0, 0, 0.1);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.small {
    height: 200px;
}

.medium {
    height: 300px;
}

.large {
    height: 400px;
}

/* Portions */
.future-plans {
    border-radius: 10px;
    margin-top: 10px;
}

/* Styling for the plans grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Adjusts based on available space */
    gap: 20px; /* Keep the gap between the cards */
    padding: 15px;
    justify-content: center;
    align-items: center;
}

/* Flip Card Container */
.flip-card {
    background-color: transparent;
    padding-left: 20px;
    margin-left: 20px;
    margin-right: 20px;
    width: 80%;
    height: 200px;
    perspective: 800px;
}

/* Inner flip card, holding both the front and back */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s ease-in-out;
    transform-style: preserve-3d;
}

/* Rotate card on hover */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Add a new class to handle flip on tap for mobile */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Front of the card */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px; /* Reduced padding */
}

/* Front styling */
.flip-card-front {
    background-color: #8ec2fb;
    font-weight: bold;
    color: #333;
}

/* Back styling */
.flip-card-back {
    background-color: #c1daf5;
    color: #333;
    transform: rotateY(180deg);
    padding: 10px;
}

/* Optional: Styling the text inside cards */
.flip-card-front h3, .flip-card-back p {
    margin: 0;
    padding: 10px;
    font-size: 1rem
}

.plan-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px; /* Reduced padding */
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 250px; /* Limited the max width */
    height: 160px; /* Reduced height */
    font-size: 0.9rem; /* Decreased font size */
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
}

.plan-card img {
    width: 50px; /* Shrunk the image */
    margin-bottom: 10px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Reduced gap */
    padding: 20px;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
  }

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 100%;
    background-color: #ccc;
    left: 50%;
    top: 0;
}

.timeline-content {
    background-color: #f4f4f4;
    padding: 15px; /* Reduced padding */
    border-radius: 8px;
    width: 60%;
    text-align: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    font-size: 15px;
    color: white;
}

@media (max-width: 2500px) {
    
    .hero {
        display: flex;
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 100vh;
    }
    
    .hero-content {
        text-align: left;
        position: absolute;
        display: block;
        padding: 20px;
        flex-direction: column;
        border-style: ridge;
        border-color: black;
        max-width: 700px;
        backdrop-filter: blur(30px);
        box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.37);
        background-color: rgba(0, 255, 255, 0.263);
        left: 500px;
        top: 80px;
    }
    
    .hero-content p {
        font-size: 1rem;
        font-family: 'Times New Roman', Times, serif;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .journey-image {
        position: absolute;
        display: flex;
        z-index: -1;
        left: 130px;
        top: 30px;
    }
    
    .journey-image img {
        width: clamp(450px, 50%, 100%); 
        height: auto; 
        max-width: 100%; 
        margin-bottom: 20px;
        border-style: ridge;
        border-color: black;
    }
    
    p {
        line-height: 1.5;
    }
}

@media (max-width: 1500px) {

    .hero {
        display: flex;
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 100vh;
    }

    .journey-image {
        position: absolute;
        display: flex;
        z-index: -1;
        left: 130px;
        top: 30px;
    }
    
    .journey-image img {
        width: clamp(450px, 50%, 100%); 
        height: auto; 
        max-width: 100%; 
        margin-bottom: 20px;
        border-style: ridge;
        border-color: black;
    }

    .hero-content {
        text-align: left;
        position: absolute;
        display: block;
        padding: 20px;
        flex-direction: column;
        border-style: ridge;
        border-color: black;
        max-width: 700px;
        backdrop-filter: blur(30px);
        box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.37);
        background-color: rgba(0, 255, 255, 0.263);
        left: 500px;
        top: 80px;
    }
    
    .hero-content p {
        font-size: 1rem;
        font-family: 'Times New Roman', Times, serif;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 10px;
        text-align: center;
    }
}

@media (max-width: 1200px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }

    .hero {
        flex-direction: column; 
        align-items: center; 
        margin: 0;
        display: flex;
    }

    .journey-image {
        width: 100%;
        margin-bottom: 20px;
        position: relative;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        text-align: center;
    }

    .journey-image img {
        width: clamp(450px, 50%, 100%); 
        height: auto; 
        max-width: 100%;
        margin-bottom: 20px;
        border-style: ridge;
        border-color: black;
    }

    .hero-content {
        width: 100%; 
        text-align: center; 
        position: relative;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .hero-content h1 {
        color: white;
    }

    .hero-content p {
        font-size: 18px;
        color: white;
    }
}

@media (max-width: 820px) {
    
    .image-gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }

    .hero {
        flex-direction: column; 
        align-items: center; 
        margin: 0;
        display: flex;
    }

    .journey-image {
        width: 100%;
        margin-bottom: 20px;
        position: relative;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        text-align: center;
    }

    .journey-image img {
        width: clamp(450px, 50%, 100%); 
        height: auto; 
        max-width: 100%;
        margin-bottom: 20px;
        border-style: ridge;
        border-color: black;
    }

    .hero-content {
        width: 100%; 
        text-align: center; 
        position: relative;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .hero-content h1 {
        color: white;
    }

    .hero-content p {
        font-size: 18px;
        color: white;
    }
}


@media (max-width: 768px) {

    .image-gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }

    .hero {
        flex-direction: column; 
        align-items: center; 
        margin: 0;
        display: flex;
    }

    .journey-image {
        width: 100%;
        margin-bottom: 20px;
        position: relative;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        text-align: center;
    }

    .journey-image img {
        width: clamp(450px, 50%, 100%); 
        height: auto; 
        max-width: 100%;
        margin-bottom: 20px;
        border-style: ridge;
        border-color: black;
    }

    .hero-content {
        width: 100%; 
        text-align: center; 
        position: relative;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .hero-content h1 {
        color: white;
    }

    .hero-content p {
        font-size: 18px;
        color: white;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: 1fr; /* 1 column on small screens */
    }

    .hero-content p {
        color: white;
    }

    .hero-content h1 {
        color: white;
    }
}